用jquery给li标签加上id
html代码:<divclass="left-navigation"><ulclass="multiselect"><liclass="invsiblecheckbox"...
html代码:
<div class="left-navigation">
<ul class="multiselect">
<li class="invsible checkbox"><a title="5W-30" href="/plus/list.php?tid=7&jiyoubiaohao=5W-30">5W-30</a></li>
<li class="invsible checkbox"><a title="10W-40" href="/plus/list.php?tid=7&jiyoubiaohao=10W-40">10W-40</a></li>
<li class="invsible checkbox"><a title="5W-40" href="/plus/list.php?tid=7&jiyoubiaohao=5W-40">5W-40</a></li>
<li class="invsible checkbox"><a title="0W-30" href="/plus/list.php?tid=7&jiyoubiaohao=0W-30">0W-30</a></li>
<li class="invsible checkbox"><a title="5W-20" href="/plus/list.php?tid=7&jiyoubiaohao=5W-20">5W-20</a></li>
<li class="invsible checkbox"><a title="0W-40" href="/plus/list.php?tid=7&jiyoubiaohao=0W-40">0W-40</a></li>
<li class="invsible checkbox"><a title="0W-20" href="/plus/list.php?tid=7&jiyoubiaohao=0W-20">0W-20</a></li>
<li class="invsible checkbox"><a title="10W-30" href="/plus/list.php?tid=7&jiyoubiaohao=10W-30">10W-30</a></li>
</ul>
</div>
给li标签加上如:
<li class="invsible checkbox" id="id_1">
<li class="invsible checkbox" id="id_2">
<li class="invsible checkbox" id="id_3">
这样的。 展开
<div class="left-navigation">
<ul class="multiselect">
<li class="invsible checkbox"><a title="5W-30" href="/plus/list.php?tid=7&jiyoubiaohao=5W-30">5W-30</a></li>
<li class="invsible checkbox"><a title="10W-40" href="/plus/list.php?tid=7&jiyoubiaohao=10W-40">10W-40</a></li>
<li class="invsible checkbox"><a title="5W-40" href="/plus/list.php?tid=7&jiyoubiaohao=5W-40">5W-40</a></li>
<li class="invsible checkbox"><a title="0W-30" href="/plus/list.php?tid=7&jiyoubiaohao=0W-30">0W-30</a></li>
<li class="invsible checkbox"><a title="5W-20" href="/plus/list.php?tid=7&jiyoubiaohao=5W-20">5W-20</a></li>
<li class="invsible checkbox"><a title="0W-40" href="/plus/list.php?tid=7&jiyoubiaohao=0W-40">0W-40</a></li>
<li class="invsible checkbox"><a title="0W-20" href="/plus/list.php?tid=7&jiyoubiaohao=0W-20">0W-20</a></li>
<li class="invsible checkbox"><a title="10W-30" href="/plus/list.php?tid=7&jiyoubiaohao=10W-30">10W-30</a></li>
</ul>
</div>
给li标签加上如:
<li class="invsible checkbox" id="id_1">
<li class="invsible checkbox" id="id_2">
<li class="invsible checkbox" id="id_3">
这样的。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询