案例:html/html5 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html> 
2
<html> 
3
<body> 
4
5
<button onclick="getMuted()" type="button">该视频默认是静音的吗?</button>
6
<button onclick="setToMuted()" type="button">把视频设置为默认静音,并重载视频</button>
7
<br />
8
<br />
9
<video id="video1" controls="controls">
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 getMuted()
18
  { 
19
  alert(myVid.defaultMuted);
20
  } 
21
function setToMuted()
22
  { 
23
  myVid.defaultMuted=true;
24
  myVid.load()
25
  } 
26
</script> 
27
28
</body> 
29
</html>
30