本帖最后由 hasending 于 2011-07-24 20:45:43 编辑

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title></head>
    <Body>
       <img src="SSL23891.jpg" width="100" height="90" style="cursor:hand">
    <script language="javascript">
    function Imgs_OnMouseMove()
    {
      alert("move");
    return;
    }function attachImgsMouseEvent()
    {
      var Imgs=document.getElementsByTagName('img');
      for(var i=0;i<Imgs.length;i++)
      {
      if(!(Imgs[i].onmousemove))
      {
      Imgs[i].onmousemove=this.Imgs_OnMouseMove;
      }
      }
    }
    window.onload=attachImgsMouseEvent;
    </script>
    </html>
      

  2.   

    onmousemove小写你写的是onmouseMove  M大写了
      

  3.   

    不能采用<img src="SSL23891.jpg" width="100" height="90" style="cursor:hand" onmousemove=“func()”> 的方法,需要在javascript里面控制,很奇怪,我添加onmouseover都可以,为什么onmousemove就不行呢?