search

Home  >  Q&A  >  body text

javascript - jQuery selects from 0 to the specified position, how to get it?

How to give the specified li.qd from the first li and not including .meiwo
<ul>
<li></li>
<li class="meiwo "></li>
<li></li>
<li class="qd"></li>
<li></li>
<li></li>
</ul>

ringa_leeringa_lee2808 days ago505

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-19 10:36:31

    $("ul li:lt("+($('ul .qd').index())+"):not(.meiwo)").text("vvvvvv");

    reply
    0
  • Cancelreply