- 论坛徽章:
- 0
|
jquery 更改onclick 事件
Js代码- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title> New Document </title>
- <meta name="Generator" content="EditPlus">
- <meta name="Author" content="">
- <meta name="Keywords" content="">
- <meta name="Description" content="">
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
- <script>
- $(function(){
- $("a").attr("onclick","").click(function(){alert("bbb")})
-
-
- })
- </script>
- </head>
-
- <body>
- <a onclick="alert('aaa');" href="#">aaa</a>
- </body>
- </html>
复制代码 |
|