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