Home >Backend Development >PHP Tutorial >求教我点击所有服务订单时刷新了一下颜色没有改变,怎么使点击的颜色改变,没点击的颜色还原。是不是要用无刷新的。

求教我点击所有服务订单时刷新了一下颜色没有改变,怎么使点击的颜色改变,没点击的颜色还原。是不是要用无刷新的。

WBOY
WBOYOriginal
2016-06-23 13:22:03886browse


	<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 了,还用古典的刷新?太不讲究了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn