发现一个有趣的问题

来源:6-2 鼠标单击事件( onclick )

剑指offer

2019-10-23 18:18

把onclick换成onmousemove有惊喜

写回答 关注

2回答

  • qq_慕虎2304570
    2020-12-16 19:46:10

    有毒吧,以为我看不懂while,虽然我试过。?

  • 剑指offer
    2019-10-23 18:31:35

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>单击事件 </title>
    <script type="text/javascript">
      function openwin(){
             var i=0;
             while(i<100){
                  window.open('http://www.baidu.com','_blank');
                  i++;
          }    
    }
    </script>
    </head>
    <body>
      <form>
        <input name="点击我" type="button" value="点击我" onmousemove="openwin()"/>
      </form>
    </body>
    </html>

JavaScript进阶篇

本课程从如何插入JS代码开始,带您进入网页动态交互世界

468868 学习 · 22582 问题

查看课程

相似问题