案例:html/html5 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html> 
2
<html> 
3
<body> 
4
5
<button onclick="getVid()" type="button">获得当前视频的 URL</button>
6
<br />
7
<br />
8
<video id="video1" controls="controls">
9
  <source src="/example/html5/mov_bbb.mp4" type="video/mp4">
10
  <source src="/example/html5/mov_bbb.ogg" type="video/ogg">
11
  Your browser does not support HTML5 video.
12
</video>
13
14
<script>
15
myVid=document.getElementById("video1");
16
function getVid()
17
  { 
18
  alert(myVid.currentSrc);
19
  } 
20
</script> 
21
22
</body> 
23
</html>
24