show or hidden DIV

<SCRIPT type="text/javascript" src="jquery-1.7.1.min.js"></SCRIPT>
<script type="text/javascript" language="JavaScript">
 
         function showdiv(){
                   $('#showdiv1').html($('#showcontent1').html());
                   $('#rrr').focus();
           }
           
         function showdiv2(){
                   $('#showdiv1').html();
                   $('#showdiv1').html($('#showcontent2').html());
                   //alert($('#kkkk').val()+"-------------");
                   $('#kkkk').focus();
                   //$('#rrr').focus();
                   // document.getElementById("kkkk").click();
           }
           
         function test3(){
                   //alert(111);
         }
</script>
 
<body> 
 
<a onclick="showdiv()">
show 1 button
</a>
<br/>
<br/>
<div id="showdiv1"> 
 
</div>
<br/>
<br/>
<br/>
 
<div id="showcontent1" style="display:none">
<input type="button"  id="rrr" value="1234" onkeydown='if(event.keyCode==13){alert(1234)}' style="font-size:15px;font-weight:bold;width:166px;height:42px;border:0;background:url(cancel.png);background-repeat: no-repeat;color: white;font-weight: bold;" /> 
 
<a onclick="showdiv2()">
show 2 button
</a>
</div>
 
<div id="showcontent2" style="display:none">
<input type="button"  id="kkkk"  onclick="test3()" onkeydown='if(event.keyCode==13){alert(5678)}' value="5678" style="font-size:15px;font-weight:bold;width:166px;height:42px;border:0;background:url(next.png);background-repeat: no-repeat;color: white;font-weight: bold;"/>
</div>
 
 
</body>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值