JeWangZhe 2012-08-30
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gbk"/>
<title>StripingTable</title>
<scripttype="text/javascript"src="http://www.wozaishuo.com.cn/example/jquery/jquery-1.2.1.js"></script>
<scripttype="text/javascript">
<!--
$(document).ready(function(){});
//隐藏和显示div层
functionchangeDisplay(){
varhelloDivObj=$("#helloDiv");
varbuttonObj=$("#btnDisplay");
varval=buttonObj.attr("value");
if(val=="隐藏"){
helloDivObj.hide();
buttonObj.attr("value","显示");
}else{
helloDivObj.show();
buttonObj.attr("value","隐藏");
}
//varhelloDivObj=$("#helloDiv").toggle();//甚至只需要这一句搞定切换隐藏与显示
}
-->
</script>
</head>
<body>
<divclass="title_a">一、JQuery核心库</div>
<divclass="title_b">(一)、jQuery(e-xpression,[context])用法!</div>
<divclass="title_c">3.jQuery(elements)</div>
将一个或多个DOM元素转化为jQuery对象。这个函数也可以接收XML文档和Window对象(虽然它们不是DOM元素)作为有效的参数。<p></p>
<inputid="btnDisplay"type="button"value="隐藏"onclick="changeDisplay()"/>
<divid="helloDiv">
Hello,everyone<p></p>
Hello,everytwo<p></p>
Hello,everythree<p></p>
</div>
</bdoy>
</html>