<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob)</title>
<script src="https://cdn.staticfile/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/images/srpr/logo3w.png'>
<img src='https://www.google/images/srpr/logo3w.png'>
<p>接着点我!</p>
<p>接着点我!2</p>
<p>接着点我!3</p>
<a>测试</a>
</body>
</html>
更多推荐
jquery移除标签
发布评论