10.bootstrap分页,点击哪个分页号,哪个分页号就active
1.分页,点击哪个分页号,哪个分页号就active
<nav> <ul class="pagination"> <li><a href="javascript:void(0);">1</a></li> <li class="active"><a href="javascript:void(0);">2</a></li> <li><a href="javascript:void(0);">3</a></li> </ul> </nav>
<script type="text/javascript"> $(function(){ $(".pagination a").click(function(){ $(".pagination li").removeClass(); $(this).parent().addClass("active"); }); }); </script>