<li style="background:#2479a5;" onclick="search2()">进行中的订单</li> <li onclick="search3()">所有服务订单</li>
function search2(obj){ var state = 0; var url = "{:U('/addon/Order/Member/lists')}"+"&state="+state; window.location.href = url; } function search3(obj){ //var state = 1; var url = "{:U('/addon/Order/Member/lists')}"; window.location.href = url; }
<script type="text/javascript"> $(function(){ $(".load ul li").click(function(){ // $(".load ul li") $(this).css("background","#2479a5").siblings().css("background","#4ab3e9"); var n=$(this).index(); $(".mem .list_bg").hide(); $(".mem .list_bg").eq(n).show(); }) $(".page_cen .pg").click(function(){ $(".page .pg").css({"background":"#fff","color":"#4c637b"}); $(this).css({"background":"#4ab2e9","color":"#fff"}); }) var len=$(".list_record").length; $(".record_num span").text(len); })</script>
当然!都用 jQuery 了,还用古典的刷新?太不讲究了