1116

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
 2 
 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 4 <html xmlns="http://www.w3.org/1999/xhtml">
 5 <head>
 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 7 <title>无标题文档</title>
 8 
 9 <script type="application/javascript" src="js/jquery-1.11.3.js">
10 
11 </script>
12 
13 <script type="application/javascript">
14 $(document).ready(function(){
15     
16 $('#hide').click(function(){$('p').hide();});
17 $('#show').click(function(){$('p').show();});
18 
19 }
20 )
21 
22 
23 
24 
25 </script>
26 
27 </head>
28 
29 <body>
30 
31 <p>冒险</p>
32 
33 <input id="hide" type="button" value="隐藏" />
34 
35 
36 <input id="show" type="button" value="显示" />
37 
38 
39 <p>显示的内容</p>
40 <p class="a">显示的内容2</p>
41 <div class="a">div标签</div>
42 
43 
44 <input id="hide" οnclick="$(this).click($('.a').fadeToggle(2000))" 
45 
46 type="button" value="隐藏" />
47 
48 <input id="show" οnclick="$(this).click($('.a').show())" type="button" 
49 
50 value="显示" />
51 
52 </body>
53 </html>

 

转载于:https://www.cnblogs.com/ymf123/p/4970236.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值