案例:html5案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html> 
2
<html> 
3
<body> 
4
5
<div style="text-align:center;">
6
  <button onclick="playPause()">播放/暂停</button> 
7
  <button onclick="makeBig()"></button>
8
  <button onclick="makeNormal()"></button>
9
  <button onclick="makeSmall()"></button>
10
  <br /> 
11
  <video id="video1" width="420" style="margin-top:15px;">
12
    <source src="/example/html5/mov_bbb.mp4" type="video/mp4" />
13
    <source src="/example/html5/mov_bbb.ogg" type="video/ogg" />
14
    Your browser does not support HTML5 video.
15
  </video>
16
</div> 
17
18
<script type="text/javascript">
19
var myVideo=document.getElementById("video1");
20
21
function playPause()
22
{ 
23
if (myVideo.paused) 
24
  myVideo.play(); 

 运行结果 
 北美留学生论坛