<head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- 引入jQuery --> <script src="http://www.cnblogs.com/scripts/jquery-1.3.1.js" type="text/javascript"></script> <script> $(function(){ $("a").click(function(event) { alert(event.type);//获取事件类型 return false;//阻止链接跳转 }); }) </script> </head> <body> <a href=\'http://google.com\'>click me .</a> </body> </html>
相关文章:
- js阻止a标签默认跳转 2021-08-21
- a标签阻止跳转的方法 2021-10-28
- a标签--超链接 2021-11-18
- jQuery禁用a标签链接功能【转】 2021-12-12
- 阻止a标签点击跳转刷新 2021-08-21
- 阻止a标签默认跳转事件 2022-12-23
- a标签如何禁止href跳转或链接? 2022-02-09