xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>基础教程(div.cn)</title>
</head>
<body>
<p>视频播放及暂停。</p>
<video id="myVideo" width="320" height="176" controls>
<source src="mov_bbb.mp4" type="video/mp4">
<source src="mov_bbb.ogg" type="video/ogg">
您的浏览器不支持 HTML5 video 标签。
</video>
<script>
var vid = document.getElementById("myVideo");
vid.addEventListener("pause", function()
{
alert("视频暂停播放");
});
</script>
</body>
</html>