2016-04-08 50 views
0

如何獲取我的分頁的活動頁碼?使用jquery獲取跨文本

<div class="pages"> 
<ul> 
    <li class="prev"> 
     <a href="#"><span>previous</span></a> 
    </li> 
    <li class="pagination-page-numbers"> 
     <a href="#"><span>1</span></a> 
    </li> 
    <li class="pagination-page-numbers"> 
     <a href="#"><span>2</span></a> 
    </li> 
    <li class="pagination-page-numbers on"> 
     <a href="#"><span>3</span></a> 
    </li> 
    <li class="next"> 
    <span><span>next</span></span> 
    </li> 
    </ul> 
</div> 

回答

3
$('.pagination-page-numbers.on').find('span').text(); 
+0

@ fini-非常感謝你:) – coder