vendredi 8 janvier 2016

random video generator in HTML

I used a simple random number generator and named my mp4 files "1" "2" and "3" and my html page is blank

code:

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>Connor's video clock</title>
</head>

<body>
  <script>
    < div id = vid >
      < video width = "320"
    height = "240"
    controls >
      < source src = Math.floor((Math.random() * 3) + 1) + ".mp4" > Please update your browser < /source>
  </script>
</body>

</html>



Aucun commentaire:

Enregistrer un commentaire