<div class="codetitle"> <span><a style="CURSOR: pointer" data="92377" class="copybut" id="copybut92377" onclick="doCopy('code92377')"><u>复制代码</u></a></span>代码如下:</div> <div class="codebody" id="code92377"> <br><script src="Jquery1.7.js" type=" text/javascript"></script> <br><script type="text/javascript"> <br>$(function () { <br>$('#btn').click(function () { <br>//$('span:hidden').addClass('class1').show() ; <br>$(':hidden').addClass('class1').show(); <br><br>//$('div:visible').addClass('class1'); $('div:visible').addClass('class1'); <br>}) <br>}) <br></script> <br></head> <br> <br><form id="form1"> <br><div> <br>第一层</div> <br><span style="display: none;">非表示</span> <br><input type="button" id="btn" value="显示" /> <br></form> <br></body> <br><br> </div> </div>