<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jquery的隐藏与显示</title>
<script src="jquerylib/jquery-1.12.3.js"></script>
<script>
$(function(){
$("document").ready(function(){
$("input").click(function(){
$("p").hide();
});
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<!--<button>Click me</button>-->
<input type="button" value="click me"/>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title>jquery的隐藏与显示</title>
<script src="jquerylib/jquery-1.12.3.js"></script>
<script>
$(function(){
$("document").ready(function(){
$("input").click(function(){
$("p").hide();
});
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<!--<button>Click me</button>-->
<input type="button" value="click me"/>
</body>
</html>