案例:html/html5 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html> 
2
<html> 
3
<body> 
4
5
<button onclick="enableControls()" type="button">启动控件</button>
6
<button onclick="disableControls()" type="button">禁用控件</button>
7
<button onclick="checkControls()" type="button">检查控件的状态</button>
8
<br> 
9
<video id="video1">
10
  <source src="/example/html5/mov_bbb.mp4" type="video/mp4">
11
  <source src="/example/html5/mov_bbb.ogg" type="video/ogg">
12
  Your browser does not support HTML5 video.
13
</video>
14
15
<script>
16
myVid=document.getElementById("video1");
17
function enableControls()
18
  { 
19
  myVid.controls=true;
20
  myVid.load();
21
  } 
22
function disableControls()
23
  { 
24
  myVid.controls=false;
25
  myVid.load();
26
  } 
27
function checkControls()
28
  { 
29
  alert(myVid.controls);
30
  } 
31
</script> 
32
33
</body>
34
</html>
35