<script language="javascript">
function domove(i)
{switch (i)
case 1:i1.src="2.gif"
}
</script>
<body>
<img name=i1 src="17.gif" onmousemove ="domove(1);">
<body>
指示:Microsoft JScript 运行时错误: 'I01' 未定义
这是怎么回事啊 

解决方案 »

  1.   

    document.all.i1
    这样的话不会提示错误但什么效果也没有
      

  2.   

    <script language="javascript">
    function domove(i)
    {switch (i)
    case 1:document.all.i1.src="2.gif";
           alert(document.all.i1.src);
    }
    </script>
    <body>
    <img name=i1 src="17.gif" onmousemove ="domove(1);">
    <body>
    alert中显示的src是2.gif
    但是网页中的图片并没有改变啊