日期:2014-05-17  浏览次数:20660 次

怎样在html中播放视频(IE和火狐都支持)
<html>  
  <head>  
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">  
  <title>夏日冰爽</title>  
   
<script language="javascript">
var state;
  function playerinit() {  
  WindowsMediaPlayer.url = "DQ_30s.mp4"; //定义你自己的文件  
  WindowsMediaPlayer.settings.autoStart = false;  
  }  
  function play() {
WindowsMediaPlayer.URL = "DQ_30s.mp4";  
  onload= "playerinit()" 

  if (WindowsMediaPlayer.controls.isavailable("play")) {  
  WindowsMediaPlayer.controls.play();  
  }  
  }
</script>
  </SCRIPT> 
  </head>  
  <body onload="play()">
<div id="div" style="display:back;" >
  <table width="100%" border="0" cellpadding="0" cellspacing="0" id="table1">  
  <tr>  
  <td colspan="2" align="center">  
  <object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer" width="380" height="220">  
  <param name="URL" value="">  
  <param name="rate" value="1">  
  <param name="balance" value="0">  
  <param name="currentPosition" value="0">  
  <param name="defaultFrame" value="">  
  <param name="playCount" value="">  
  <param name="autoStart" value="0">  
  <param name="currentMarker" value="0">  
  <param name="invokeURLs" value="0">  
  <param name="baseURL" value="">  
  <param name="volume" value="100">  
  <param name="mute" value="-1">  
  <param name="uiMode" value="none">  
  <param name="stretchToFit" value="0">  
  <param name="windowlessVideo" value="0">  
  <param name="enabled" value="-1">  
  <param name="enableContextMenu" value="-1">  
  <param name="fullScreen" value="false">  
  <param name="SAMIStyle" value="">  
  <param name="SAMILang" value="">  
  <param name="SAMIFilename" value="">  
&nb