<html>
<head>
<meta charset="UTF-8">
<title>属性选择器</title>
<script language="JavaScript" src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
var t_a=$(".test :hidden");
var t_b=$(".test:hidden");
console.log(t_a);
console.log(t_b);
var len_a=t_a.length;
var len_b=t_b.length;
console.log(len_a);
console.log(len_b);
</script>
</head>
<body>
<div class="test">
<div style="display:none">aa</div>
<div style="display:none">bb</div>
<div style="display:none">cc</div>
<div class="test" style="display:none">dd</div>
</div>
<div class="test" style="display:none">ee</div>
<div class="test" style="display:none">ff</div>
</body>
</html>
添加回答
举报
0/150
提交
取消