Tip: you can modify some code before running
<p><HTML><br /><HEAD><br /><TITLE> new skin replacement technology </TITLE><br /><Link ID = "skin" rel = "stylesheet" type = "text/css"><br /><Script language = javascript><br /><! --<br />Function SetCookie (name, value ){<br />Var argv = SetCookie. arguments;<br />Var argc = SetCookie. arguments. length;<br />Var expires = (2 <argc )? Argv [2]: null;<br />Var path = (3 <argc )? Argv [3]: null;<br />Var domain = (4 <argc )? Argv [4]: null;<br />Var secure = (5 <argc )? Argv [5]: false;<br />Document. cookie = name + "=" + escape (value) + (expires = null )? "" :( "; Expires =" + expires. toGMTString () + (path = null )? "" :( "; Path =" + path) + (domain = null )? "" :( "; Domain =" + domain) + (secure = true )? "; Secure ":"");<br />}</p><p>Function GetCookie (Name ){<br />Var search = Name + "= ";<br />Var returnvalue = "";<br />If (document. cookie. length> 0 ){<br />Offset = document. cookie. indexOf (search );<br />If (offset! =-1 ){<br />Offset + = search. length;<br />End = document. cookie. indexOf (";", offset );<br />If (end =-1)<br />End = document. cookie. length;<br />Returnvalue = unescape (document. cookie. substring (offset, end ));<br /> }<br /> }<br />Return returnvalue;<br />}</p><p>Var thisskin;<br />Thisskin = GetCookie ("nowskin ");<br />If (thisskin! = "")<br />Skin. href = thisskin;<br />Else<br />Skin. href = "css.css ";</p><p>Function changecss (url ){<br />If (url! = ""){<br />Skin. href = url;<br />Var expdate = new Date ();<br />Expdate. setTime (expdate. getTime () + (24*60*60*1000*30 ));<br />// Expdate = null;<br />// Set the cookie time to one year ..<br />SetCookie ("nowskin", url, expdate, "/", null, false );<br /> }<br />}<br />// --><br /></SCRIPT><br /></HEAD><br /><BODY></p><p><P> select the drop-down menu below to test the skin replacement effect. </P></p><p><Select onchange = "changecss (this. value)"><br /><Option> select a style sheet file </option><br /><Script language = "javascript"><br />Var csss = new Array ();<br />Csss [0] = "001.css ";<br />Csss [1] = "002.css ";<br />Csss [2] = "003.css ";<br />Csss [3] = "004.css ";<br />Var I;<br />For (I = 0; I <4; I ++)<br />If (thisskin = csss [I])<br />Document. write ("<option value = \" "+ csss [I] +" \ "selected>" + csss [I] + "style sheet file </option> ");<br />Else<br />Document. write ("<option value = \" "+ csss [I] +" \ ">" + csss [I] + "style sheet file </option> ");<br /></Script><br /></Select><br /></BODY><br /></HTML></p>
Tip: you can modify some code before running