案例:jquery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="/js/jquery-1.11.1.min.js"></script>
5
<script type="text/javascript">
6
$(document).ready(function(){
7
  $("#hide").click(function(){
8
  $("p").hide();
9
  });
10
  $("#show").click(function(){
11
  $("p").show();
12
  });
13
});
14
</script>
15
</head>
16
<body>
17
<p id="p1">如果点击“隐藏”按钮,我就会消失。</p>
18
<button id="hide" type="button">隐藏</button>
19
<button id="show" type="button">显示</button>
20
</body>
21
</html>
22