有点奇怪哦 如果没有那个iframe就不会这样

解决方案 »

  1.   


    <div id="aa">1111</div>
    <iframe src="2.htm"></iframe>
    <script>
    document.onmousemove = function(){alert(1);document.getElementById("aa").innerHTML+="a";}
    </script>
      

  2.   

    原来这样
    那怎样才能鼠标在iframe上的时候也触发这个事件
      

  3.   

    <iframe onmouseover="alert(1);" src="2.htm"></iframe>
      

  4.   

    iframe外面再套个同样大小div之类的就是
      

  5.   

    给Iframe不就行了
    <form method="post" action="">
    <div>
    <div id="aa">1111</div>
    <iframe src="2.htm"></iframe>
    <script>document.getElementsByTagName("iframe")[0].document.onmousemove = function(){alert(1);document.getElementById("aa").innerHTML+="a";}
    </script></div>
    </form>
      

  6.   

    <iframe src="2.htm" onmousemove = "function(){alert(1);parent.document.getElementById('aa').innerHTML+='a';}"></iframe>