<html>
<head>
<title>JavaScript</title>
</head>
<body>
<hr>
<a id="a1" href="#" onclick="alert('onclick未移除')">11</a>
<input type=button onclick="removea_click()" value="移除" />
<script> function removea_click() { document.getElementById('a1').onclick = "";alert("移除成功") }</script>
</body>
</html>
怎么移除a 标签的onclick事件
最新推荐文章于 2023-02-06 16:20:57 发布