谁能告诉我如何从“active_page”类的“li”中选择“a”?我尝试了以下方法,但它不起作用:
if($('.active_page').next('.page_link').length==true){
go_to_page(new_page);
}
<ul>
<li>
<a class="previous_link" href="javascript:go_to_previous();">Prev</a>
</li>
<li>
<a class="page_link active_page" href="javascript:go_to_page(0)" longdesc="0">1</a>
</li>
<li>
<a class="page_link" href="javascript:go_to_page(1)" longdesc="1">2</a>
</li>
<li>
<a class="page_link" href="javascript:go_to_page(2)" longdesc="2">3</a>
</li>
<li>
<a class="next_link" href="javascript:go_to_next();">Next</a>
</li>
</ul>
谢谢