请问如何用JS获取所有LI中第三个<SPAN>里隐藏内容的循环处理
<scriptsrc="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"type="tex...
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<DIV class="time_lbc">
<UL id=index_tab01>
<LI onMouseOver="this.className='b'" onMouseOut="this.className=''">
<span class="cx">XX</span>
<SPAN class="xm">XX</SPAN>
<SPAN class="jie" style="display:none">20</span>
<SPAN class="list">XX</SPAN>
<SPAN class="address">XX</SPAN>
</LI>
<LI onMouseOver="this.className='b'" onMouseOut="this.className=''">
<span class="cx">XX</span>
<SPAN class="xm">XX</SPAN>
<SPAN class="jie" style="display:none">15</span>
<SPAN class="list">XX</SPAN>
<SPAN class="address">XX</SPAN>
</LI>
<LI onMouseOver="this.className='b'" onMouseOut="this.className=''">
<span class="cx">XX</span>
<SPAN class="xm">XX</SPAN>
<SPAN class="jie" style="display:none">18</span>
<SPAN class="list">XX</SPAN>
<SPAN class="address">XX</SPAN>
</LI>
....N个LI
</UL>
</DIV>
<!-- 查询处理 -->
<script type="text/javascript">
arr=[];
$("#index_tab01>li>span:nth-child(3):hidden").each(function(){
arr.push($(this).text());
});
alert(arr.join("|"));
<script>
请问在查询到所有结果后如何去对比指定的数字,如果大于指定的数字就把LI属性设置为隐藏
字误了,所有隐藏的这个字段是时间段
<SPAN class="jie" style="display:none">18:00</span> 展开
<DIV class="time_lbc">
<UL id=index_tab01>
<LI onMouseOver="this.className='b'" onMouseOut="this.className=''">
<span class="cx">XX</span>
<SPAN class="xm">XX</SPAN>
<SPAN class="jie" style="display:none">20</span>
<SPAN class="list">XX</SPAN>
<SPAN class="address">XX</SPAN>
</LI>
<LI onMouseOver="this.className='b'" onMouseOut="this.className=''">
<span class="cx">XX</span>
<SPAN class="xm">XX</SPAN>
<SPAN class="jie" style="display:none">15</span>
<SPAN class="list">XX</SPAN>
<SPAN class="address">XX</SPAN>
</LI>
<LI onMouseOver="this.className='b'" onMouseOut="this.className=''">
<span class="cx">XX</span>
<SPAN class="xm">XX</SPAN>
<SPAN class="jie" style="display:none">18</span>
<SPAN class="list">XX</SPAN>
<SPAN class="address">XX</SPAN>
</LI>
....N个LI
</UL>
</DIV>
<!-- 查询处理 -->
<script type="text/javascript">
arr=[];
$("#index_tab01>li>span:nth-child(3):hidden").each(function(){
arr.push($(this).text());
});
alert(arr.join("|"));
<script>
请问在查询到所有结果后如何去对比指定的数字,如果大于指定的数字就把LI属性设置为隐藏
字误了,所有隐藏的这个字段是时间段
<SPAN class="jie" style="display:none">18:00</span> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询