-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideo2.html
25 lines (24 loc) · 878 Bytes
/
video2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<title>video</title>
<style type="text/css">*{padding:0;margin:0;}</style>
</head>
<body>
<a style="display: block;margin:10px;padding: 10px;background-color: #ccc" href="javascript:void(0)" >1111</a>
<div>
<video webkit-playsinline playsinline style="width:100%" preload="auto" src="https://mat1.gtimg.com/yslp/xiaochengxu/video/test.mp4" id="video" type="video/mp4"></video>
</div>
<script type="text/javascript">
var video=document.getElementById("video")
;
document.querySelectorAll('a')[0].onclick = function(){
video.play();
alert(4)
}
// document.querySelectorAll('video')[0].style.width=window.innerWidth+'px';
</script>
</body>
</html>