In the other people are meeting to the time, I secretly touch oh try a cookie, alas, never used cookies, slowly forgotten the knowledge, fortunately this furtive made to, virtual, everybody don't make a noise
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8" /><title>Cookies</title></Head><Body><inputtype= "text" /><inputtype= "text" /><inputtype= "Submit" /><Button>Release cookies</Button></Body></HTML><Scripttype= "Text/javascript">varT=document.getElementsByTagName ("input")[0];varP=document.getElementsByTagName ("input")[1];varb=document.getElementsByTagName ("input")[2];varBB=document.getElementsByTagName ("Button")[0];bb.onclick=function() {alert (GetCookie ("Password"));} B.onclick=function(){ varN=T.value; vars=P.value; Setcookie ("username", N, the) Setcookie ("Password", S, the) Delcookie ("username")}functionSetcookie (n,v,t) {//N==name,v==value,t=time (MS) varD=NewDate (); D.settime (D.gettime ()+t); Document.cookie=N+"="+Escape (v)+"; expires="+d.togmtstring ();}functionGetCookie (n) {if(document.cookie) {varC=Document.cookie; vara=C.split ("; "); for(varI=0; I<A.length;i++){ varAA=A[i].split ("="); if(aa[0]==N) { returnaa[1]; } } }}functionDelcookie (n) {//N==nameSetcookie (N,NULL,- -)}</Script>
JS operation of cookies, including increment, fetch, delete