[JavaScript] jQuery绑定指定元素的鼠标点击事件(onclick)的代码 →→→→→进入此内容的聊天室

来自 , 2019-05-16, 写在 JavaScript, 查看 112 次.
URL http://www.code666.cn/view/67ed9474
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
  5. </script>
  6. <script>
  7. $(document).ready(function(){
  8.   $("p").click(function(){
  9.     $(this).hide();
  10.   });
  11. });
  12. </script>
  13. </head>
  14. <body>
  15.  
  16. <p>If you click on me, I will disappear.</p>
  17. <p>Click me away!</p>
  18. <p>Click me too!</p>
  19.  
  20. </body>
  21. </html>
  22.  
  23. //javascript/8002

回复 "jQuery绑定指定元素的鼠标点击事件(onclick)的代码"

这儿你可以回复上面这条便签

captcha