以w3c标准 html4.0或xhtml 的网页。firefox有个插件叫html validation 非常好用。

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!-- saved from url=(0099)http://www.nec.sjtu.edu.cn/coursecenter/jiemian/video1.asp?page=0&term=02chun&coursename=计算机网络 -->
    <HTML><HEAD><TITLE></TITLE>
    <META http-equiv=Content-Type content=text/html;charset=gb2312>
    <META content=影视,网络教育,视频点播 name=keywords><LINK href="video1.files/vod.css" 
    type=text/css rel=STYLESHEET><!-- ******** begin of VodIni.inc ******** --><!-- 颜色 -->
    <META content="MSHTML 6.00.2600.0" name=GENERATOR>
    <SCRIPT language=JavaScript>
    function click1(file1,file2,sound)
    {
    if(sound=="video")
    {parent.frames["board"].MediaPlayer1.mute=-1;
    MPlay1.mute=0;
    }
    else
    {
    MPlay1.mute=-1;
    parent.frames["board"].MediaPlayer1.mute=0;
    }
    document.MPlay1.Filename=file1;
    parent.frames["board"].MediaPlayer1.Filename=file2;
    }</SCRIPT><SCRIPT language=javascript event="PlayStateChange(lOldState, lNewState)" 
    for=MPlay1>
     if(2==lNewState) //Play
           {
                if(parent.frames["board"].MediaPlayer1.Filename!="")
                   {
                       parent.frames["board"].MediaPlayer1.Play();
                   }
            }
     if(1==lNewState)  //Pause     
            {
                  parent.frames["board"].MediaPlayer1.Pause();
            }
     if(0==lNewState)
            {
                  parent.frames["board"].MediaPlayer1.Stop();
            }
       SwitchImage();
    </SCRIPT><SCRIPT language=javascript>
    function stopboard()
    {
           parent.frames["board"].MediaPlayer1.Stop();
    }
    </SCRIPT><SCRIPT language=JScript event="PositionChange(dblOldPosition, dblNewPosition)" 
    for=MPlay1>
        //insert script commands//
        parent.frames["board"].MediaPlayer1.CurrentPosition=dblNewPosition;
    </SCRIPT><SCRIPT language=javascript id=clientEventHandlersJS>
    function window_onresize() {
    var tmpHeight;
    var tmpBodyHeight;
    tmpHeight =  VideoLayer.offsetWidth * 3/4+20 ;
    tmpBodyHeight = document.body.offsetHeight;
    if (tmpBodyHeight <= 80) return;
    if (tmpBodyHeight > tmpHeight + 80) {
    VideoLayer.style.height = tmpHeight;
    // tmpHeight = tmpHeight + MPlayControl.offsetHeight;

    InfoTable.style.height = document.body.offsetHeight - tmpHeight;

    } else {

    InfoTable.style.height = 70;
    }
    if (MPlay1.PlayState < 2 || MPlay1.PlayState == 8) {

    }

    }
    </SCRIPT><SCRIPT language=javascript>
    //替换播放控制按纽图片的函数
    function SwitchImage() 
    {
    switch(MPlay1.PlayState)
    {
          case 0:// stopped
                            btplay.src="Video.files/pic1_r2_c1.jpg";

    btpause.src="Video.files/pic1_r2_c2.jpg";
    btstop.src="Video.files/pic2_r2_c3.jpg";
    if (MPlay1.CanScan)
    {
    btff.src="Video.files/pic1_r2_c6.jpg";
    btbb.src="Video.files/pic1_r2_c5.jpg";
    }
             else
    {
    btff.src="Video.files/pic1_r2_c6.jpg";
    btbb.src="Video.files/pic1_r2_c5.jpg";
    }
    break; case 1://paused
    btplay.src="Video.files/pic1_r2_c1.jpg";
    btpause.src="Video.files/pic2_r2_c2.jpg";
    btstop.src="Video.files/pic1_r2_c3.jpg";
    if (MPlay1.CanScan)
    {
    btff.src="Video.files/pic1_r2_c6.jpg";
    btbb.src="Video.files/pic1_r2_c5.jpg";
    }
           else
    {
    btff.src="Video.files/pic1_r2_c6.jpg";
    btbb.src="Video.files/pic1_r2_c5.jpg";
    }
    break; case 2://Playing

    btplay.src="Video.files/pic2_r2_c1.jpg";
    btpause.src="Video.files/pic1_r2_c2.jpg";
    btstop.src="Video.files/pic1_r2_c3.jpg";
    if (MPlay1.CanScan)
    {
    btff.src="Video.files/pic1_r2_c6.jpg";
    btbb.src="Video.files/pic1_r2_c5.jpg";
    }
           else
    {
    btff.src="Video.files/pic1_r2_c6.jpg";
    btbb.src="Video.files/pic1_r2_c5.jpg";
    }
    break; case 3://Waiting
    break; case 4://scan forward
    btplay.src="Video.files/pic1_r2_c1.jpg";
    btpause.src="Video.files/pic1_r2_c2.jpg";
    btstop.src="Video.files/pic1_r2_c3.jpg";
    btff.src="Video.files/pic2_r2_c6.jpg";
                    btbb.src="Video.files/pic1_r2_c5.jpg";
    break; case 5://scan reverse
    btplay.src="Video.files/pic1_r2_c1.jpg";
    btpause.src="Video.files/pic1_r2_c2.jpg";
    btstop.src="Video.files/pic1_r2_c3.jpg";
    btff.src="Video.files/pic1_r2_c6.jpg";
                    btbb.src="Video.files/pic2_r2_c5.jpg";
    break;
    }

    </SCRIPT><SCRIPT language=JavaScript>function PlaybtClick() 
    {
    MPlay1.Play();
    }
    function PausebtClick() 
    {
    //如果当前状态为暂停,则开始播放
    if( MPlay1.PlayState == 1 ) 
    {        
    Mplay1.play();


    //暂停播放
    else 
    {
    MPlay1.Pause();
    }
    }
    function StopbtClick() 
    {
    MPlay1.Stop();
    MPlay1.CurrentPosition = 0;


    }function FfbtClick() 
    {
    MPlay1.FastForward();
    }function BbbtClick() 
    {
    MPlay1.FastReverse();
    }
    </SCRIPT><SCRIPT language=JavaScript>
    var Selected = false, CurLeft = 4;
    //MouseDown -> DragStart -> MouseMove -> MouseUp
    //Log the MouseDown action on special object(btnScroll)
    //按下鼠标事件
    function doMouseDown() 
    {
       if(event.button == 1) 
    {

    Selected = true;
    }
    }//开始拖动鼠标事件
    function doDragStart() 
    {
    // Don't do default drag operation if user is dragging the special object
    if(Selected) 
    {      
    event.returnValue=false;
    }
    }function doMouseMove() 
    {
    var 
    newleft = 0;
    //如果拖动区域在指定区域内
    if(Selected && (event.button == 1)) 
    {
    //align the position of this object
    //当前鼠标的相对位置
    newleft = event.clientX -4;
    if(newleft<4) 
    newleft=4;
    else 
    if(newleft>(VideoLayer.offsetWidth-12)) 
    newleft=VideoLayer.offsetWidth-12; btnScroll.style.pixelLeft= newleft;
    event.returnValue = false;
    event.cancelBubble = true;
    }
    }
    function doMouseUp() 
    {
    var
    NewLeft; if(!Selected) return;
    //获取进度条当前位置 NewLeft = btnScroll.style.pixelLeft;

    if(NewLeft != CurLeft) 
    {
    //Change the position on Media Clip
    MPlay1.CurrentPosition = (NewLeft - 4)/(VideoLayer.offsetWidth-16) * MPlay1.Duration;
    }
    //记录当前位置,避免推动至原位置时重新进行缓冲
    CurLeft = NewLeft;
    //This operation have done
    Selected = false;
    }document.ondragstart = doDragStart;
    document.onmousemove = doMouseMove;
    document.onmouseup   = doMouseUp;
    function UpdateTime()
    {
    // Update Scroll Button
    //MediaPlayer.CurrentPosition当前播放秒数
    //MediaPlayer.Duration总秒数
      if (!Selected)
    btnScroll.style.pixelLeft = 4 + (VideoLayer.offsetWidth-16) * (MPlay1.CurrentPosition / MPlay1.Duration); 
    //alert(MPlay1.CurrentPosition / MPlay1.Duration);


    }
    </SCRIPT><SCRIPT language=javascript event=onload for=window>
     window_onresize();
    window.setInterval("UpdateTime()", 1000); </SCRIPT><META content="Microsoft FrontPage 4.0" name=GENERATOR>
    </HEAD>
      

  2.   

    ………………………………………………………………………………………………非IE里面不能使用 MediaPlayer
      

  3.   

    <DIV id=VideoLayer style="LEFT: 0px; TOP: 0px">
    <OBJECT id=MPlay1 
    style="LEFT: 0px; WIDTH: 100%; POSITION: absolute; TOP: 0px; HEIGHT: 100%" 
    standby="Loading Windows Media Player components..." 
    classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 VIEWASTEXT width="286" height="225"><PARAM NAME="Filename" VALUE=""><PARAM NAME="AutoStart" VALUE="1"><PARAM NAME="AutoSize" VALUE="0"><PARAM NAME="ShowControls" VALUE="0"><PARAM NAME="ShowStatusBar" VALUE="0"><PARAM NAME="ShowDisplay" VALUE="0"><PARAM NAME="Mute" VALUE="0"><PARAM NAME="Volume" VALUE="0"><PARAM NAME="AllowChangeDisplaySize" VALUE="-1"><PARAM NAME="VideoBorderWidth" VALUE="0"></OBJECT></DIV>这部分代码好像也不行了~
      

  4.   

    firefox里面有一个javascript控制台,不像ie弹出一个错误对话框,在firefox里所有的错误均
    显示在这个javascript控制台里,定位非常准确。对于html错误,用一个叫html validator的插件,非常好用。
    多试几次,就能够明白w3c的标准编程之道。以后遵循这个标准就很简单,也就是个习惯问题,我现在开发的系统能够100%通过w3c的标准。