<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("a").click(function(){
$('img').removeAttr('src');//移除img标签
$('p').remove();//移除p标签
});
});
</script>
</head>
<body>
<img src='https://www.google.com/images/srpr/logo3w.png'>
<img src='https://www.google.com/images/srpr/logo3w.png'>
<p>接着点我!</p>
<p>接着点我!2</p>
<p>接着点我!3</p>
<a>测试</a>
</body>
</html>
jquery移除标签
最新推荐文章于 2023-06-16 20:53:39 发布