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

怎样在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">  
  &