请教各位,
现在需要写个效果就是鼠标在一个坐标点上停留超过一定时间就自动做出某些动作,
比如提示一句话alert(),找到一些相关的:
在body中,moveend就timer = setTimeout("alert()",3000);
movestart=clearTimeout(timer);哪位大哥能再具体说一下么,
在body里怎么使用moveend和movestart啊?
谢谢了

解决方案 »

  1.   

    <script>
    function exec(){
      alert("test");
    }
    function test(){
     window.setTimeOut(exec,3000);
    }</script>
    <body onload="test()">
    </body>
      

  2.   

    <body onmovestart="XXXX()" onmoveend="XXXX()" >
    是不是问的这个啊
      

  3.   

    只要你鼠标停留5秒就警告。<script language="javascript">
    var warning=""
    document.body.onload=function(){
    warning=setInterval("alert('!!')",5000);
    }
    document.body.onmousemove=function(){
    clearInterval(warning);
    warning=setInterval("alert('!!')",5000);
    }
    </script>
      

  4.   


    body 里有这两个方法么,我怎么没找到啊?
      

  5.   


    停留区域3秒
    <div style="width:40px;height:40px;border:2px solid #C8C8C8;font-size:9pt;" onmouseover="window.setTimeout(function(){alert('时间已到')},3000);">停留区域</div>