【发布时间】:2016-01-09 06:54:03
【问题描述】:
我使用了一个简单的随机数生成器并将我的 mp4 文件命名为“1”“2”和“3”,而我的 html 页面是空白的
代码:
<!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>
【问题讨论】:
标签: javascript html video random