<link id="cssChange" href="/css/s01/s1v9.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
    //定入Cookies处理方法
    var Ju51Site=new Object();
    Ju51Site.Cookie={
 set:function(name,value,expires,path,domain){
  if(typeof expires=="undefined"){
   expires=new Date(new Date().getTime()+10*24*3600*1000);
  }
  document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"; path=/")+((domain)?";domain="+domain:"");
 },
 get:function(name){
  var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
  if(arr!=null){
   return unescape(arr[2]);
  }
  return null;
 },
 clear:function(name,path,domain){
  if(this.get(name)){
   document.cookie=name+"="+((path)?"; path="+path:"; path=/")+((domain)?"; domain="+domain:"")+";expires=Fri, 02-Jan-1970 00:00:00 GMT";
  }
 }
    };
    //设置SKIN
    function setSkin(n){
    var css = document.getElementById("cssChange");
    var cssurl = "http://192.168.0.33:1289/"+n;
    css.href=cssurl;
    Ju51Site.Cookie.set("Ju51Style",n)
    }
    //读取上次访问设定的Skin
    function LoadSkin(){
    var n=Ju51Site.Cookie.get("Ju51Style");
    if(n!=null){
      setSkin(n);
    }
    }
    </script>
posted on 2010-09-28 10:39  Miler  阅读(315)  评论(1编辑  收藏  举报