久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      JQuery click()和onclick()區(qū)別是什么

      JQuery click()和onclick()區(qū)別:1、onclick是綁定事件,告訴瀏覽器在鼠標點擊時候要做什么;2、click方法的主要作用是觸發(fā)調(diào)用click方法元素onclick事件。

      JQuery click()和onclick()區(qū)別是什么

      本教程操作環(huán)境:windows7系統(tǒng)、jquery3.2.1版,該方法適用于所有品牌電腦。

      JQuery click()和onclick()區(qū)別:

      1、onclick是綁定事件,告訴瀏覽器在鼠標點擊時候要做什么

      2、click()方法的主要作用是觸發(fā)調(diào)用click方法元素onclick事件。

      3、當click()被點擊時,首先執(zhí)行的是對應元素的onclick()函數(shù),然后再是click(),示例如下:

      JS代碼 test.js:

      $("#testclick").click(function(){      console.log("$("#testclick").click");   });  function test123(){    console.log("function test()");  }
      <!DOCTYPE html> <html> <head> <title>TestJS.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">   <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->    </head>  <body>  This is my HTML page. <br>  <h1>Test html</h3>  <div>      <input type="button" onclick="test123();" class="input1" id="testclick" value="test_button"/>  </div>      <!-- JS-->  <script src="js/lib/jquery.js"></script>  <script src="js/test.js"></script>  <!-- <script src="js/test2.js"></script> -->   </body>  </html>

      相關學習推薦:javascript視頻教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號