function abc(obj){ 
  obj.src='/copyright.gif'; 

</script> 
<img src="" onmousemove="abc(this)" />

解决方案 »

  1.   

    是不是因为没有将对象以参数的形成引入到函数内部,但是直接用this不行吗
      

  2.   

    "是不是因为没有将对象以参数的形成引入到函数内部,但是直接用this不行吗"
    ----
    方法1:<img src="" onmousemove="abc.call(this)" />
    方法2:<img src="" id=test/> <script>document.getElementById("test").onmousemove=abc;</script>
      

  3.   

    就是说
    function abc(){ 
      this.src='/copyright.gif'; 

    中的this本身仅仅指函数abc,而不能代表html标签是吧,所以要么以参数的形式引入到函数中,要么用call函数将代表标签的this转变成abc的this。是这个意思吗,谢谢,刚学
      

  4.   

    是的。如果要让this标识img标签,就得用onmouseover=abc(this).来使用。然后function那里接收。
    function abc(_this){ 
      _this.src='/copyright.gif';