JQUERY 的确是个宝贝

jquery果真是利器啊,隐藏标签展示标签只需要根据位置,带上hide()或者show()方法,便可以轻易实现,如下例所示,鼠标移动到最外层,内部的两层,将会发生神奇的变化:


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title>无标题文档</title>
<script src="../../开发环境/jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload=function(){
  $("#b").hide();
}
function change(){
  $("#a").hide();
  $("#b").show();
}

</script>
</head>

<body>
    <div id="test" onMouseOver="change()" >
    <div id="a" >
       <input type="text" value="默认显示"/>
    </div></br>
    <div id="b">
       <a href="http://www.baidu.com" >超链接</a>
    </div>
 </div>
</body>
</html>

posted @ 2010-08-21 00:09  杨超路飞  阅读(142)  评论(0编辑  收藏  举报