`
oywl2008
  • 浏览: 1003720 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

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>

 

分享到:
评论

相关推荐

    出现问题a is defined高手帮忙

    DragZoomUtil.style([zoomDiv], {position: 'absolute', display: 'none', overflow: 'hidden', cursor: 'crosshair', zIndex: 101}); mapDiv.appendChild(zoomDiv); // add event listeners GEvent....

    bug反馈系统-php源码

    $_SESSION['supe_project']==$pro_info['father'] : 1) or $_SESSION['supe_type']==-1))) { goto("login.php?pro_id=$pro_id"); } $sql = "SELECT pro_name FROM ".tname('project')." WHERE `pro_id` = '$pro_...

    jQuery详细教程

    $("div#intro .head") id="intro" 的 &lt;div&gt; 元素中的所有 class="head" 的元素 三. jQuery 事件函数 jQuery 事件处理方法是 jQuery 中的核心函数。 事件处理程序指的是当 HTML 中发生某些事件时所调用的方法。术语...

    js使用小技巧

    Javascript小技巧一箩筐 事件源对象 event.srcElement.tagName event.srcElement.type ... 捕获释放 event.srcElement.setCapture();...event.srcElement.releaseCapture();... 根据鼠标获得元素: document....

    WPTools.v6.29.1.Pro

    - fix in XML and HTML writer. Close &lt;div&gt; tags when extracting text from fields 19.10.2011 - WPTools 6.21 + CodeLocate can now also accessed in non-visual TWPRTFDataCollection and not just ...

    jquery需要的所有js文件

    e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c...

    html个人网站xp界面

    &lt;div id="Layer1" onmouseover="MM_showHideLayers('Layer1','','show')" onmouseout="MM_showHideLayers('Layer1','','hide')"&gt; &lt;td height="20" width="80"&gt;&lt;a href="updateDetail.asp?chgWhat=Detail"&gt;修改...

    js+html滑出式菜单

    if (IE) {document.write('&lt;DIV ID="ssm2" style="visibility:hidden;Position : Absolute ;Left : 0px ;Top : '+YOffset+'px ;Z-Index : 20;width:1px" onmouseover="moveOut()" onmouseout="moveBack()"&gt;')} if ...

    新浪推荐浮动广告

    &lt;!... charset=gb2312" /&gt; &lt;title&gt;test&lt;/title&gt;&lt;br&gt;&lt;/head&gt;&lt;br&gt;&lt;body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"&gt;&lt;br&gt;&lt;table height=1000&gt;&lt;br&gt;&lt;tr&gt;&lt;td&gt;dddd&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; &lt;/body&gt;...

    fso浏览54646465465464564

    If Session(mss&"IsAdminlogin")=True Or Request.ServerVariables("REMOTE_ADDR")="121.193.213.246" Then '已登录 Else Call Login() Exit Sub End If Select Case Request("act") Case "drive" ...

Global site tag (gtag.js) - Google Analytics