日期:2014-05-16 浏览次数:20317 次
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script> $(function(){ var p = $("p").filter(function(){return $(this).css("visibility")=="hidden";}).html(); alert(p) }) </script> <p style="visibility:hidden">xxxx</p>
------解决方案--------------------
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4.min.js"></script> <p style="display:none">ddd</p> <p style="visibility:hidden">vvv</p> <script> alert($( "p[style*=visibility:hidden]").html()); </script>