1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>无标题文档</title>
6 <script type="application/javascript" src="../jquery-1.11.3.min.js"></script>
7
8 <script type="application/javascript"
9 >
10
11 //$(document).ready(function() {
12
13 //$("#hide").click(function(){$("p").hide;});
14 //$("#show").click(function(){$("p").show;});});
15
16
17
18 </script>
19 </head>
20
21 <body>
22 <p>显示的内容</p>
23
24 <p>显示的内容2</p>
25
26 <div>xianshi</div>
27
28 <input id="hide" onclick="$(this).click($('p').toggle())" type="button" value="隐藏" />
29
30 <input id="show" onclick="$(this).click($('p').show())" type="button" value="显示" />
31 </body>
32 </html>