function play(sc)
{
document.getElementById("max").src=sc;
alert("sadf");

解决方案 »

  1.   

    写java写习惯了吧string sc
      

  2.   

    function play(sc) 

        this.form1.max.src=sc; 
        alert("sadf"); 
    } JS不强制指定参数类型,只需要参数的名字就好了
      

  3.   


    <script  language=javascript>  
      <!--  
    function play(string sc) 

    this.form1.max.src=sc; 
    alert("sadf"); 

      //-->  
    </script>
    哈哈 string sc,看来都一样哈!
      

  4.   

    function play(sc)
    {
    document.getElementById("max").src=sc;
    alert("sadf");
    } 你的使用方法存在多种 错误
    如果直接引用名字 应该使用name属性,而不是id
    还有this并不代表document
      

  5.   

    引用1Lfunction play(sc)
    {
    document.getElementById("max").src=sc;
    alert("sadf");
      

  6.   


    <img id="img1" src="qt.jpg" width="100" height="100" onmousemove="play('qt.jpg');"> 
    <img id="img2" src="she.jpg" width="100" height="100" onmousemove="play('she.jpg');"> 
    <img id="img3" src="ma.jpg" width="100" height="100" onmousemove="play('ma.jpg');"> 
    <img id="img4" src="jz.jpg" width="100" height="100" onmousemove="play('jz.jpg');"> 
    <img id="img5" src="cm.jpg" width="100" height="100" onmousemove="play('cm.jpg');"> 
      

  7.   


    <html> 
    <head> 
    <script  language=javascript>  
      <!--  
    function play(sc) 

    form1.max.src=sc; 
    alert("sadf"); 

      //-->  
    </script> 
    </head> 
    <body> 
    <form id="form1"> 
    <table cellspacing="1" width='100%' cellpadding="0"> 
    <tr> 
    <td> 
    <img id="img1" src="qt.jpg" width="100" height="100" onmousemove="play('qt.jpg');"> 
    <img id="img2" src="she.jpg" width="100" height="100" onmousemove="play('she.jpg');"> 
    <img id="img3" src="ma.jpg" width="100" height="100" onmousemove="play('ma.jpg');"> 
    <img id="img4" src="jz.jpg" width="100" height="100" onmousemove="play('jz.jpg');"> 
    <img id="img5" src="cm.jpg" width="100" height="100" onmousemove="play('cm.jpg');"> 
    </td> 
    </tr> 
    <tr> 
    <td> 
    <img id="max" src="qt.jpg" width="300" height="300"> 
    </td> 
    </tr> 
    </table> 
    </form> 
    </body> 
    </html> 
    代码语法问题,具体自已看下,我就不多说了.