<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'); <BR>$('div:visible').addClass('class1'); <BR>}) <BR>}) <BR></script> <br> <br> <br><form id="form1"> <br><div> <br>第一层</div> <br><span style="display: none;">Hidden</span> <br><input type="button" id="btn" value="显示"> <br> </form> <br> <br> </div>