Français
<!--把如下代码加入<body>区域中 --> <SCRIPT LANGUAGE="JavaScript"> <!-- Start var expDays = 30; var exp = nouvelle Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); function Who(info){ var VisitorName = GetCookie('VisitorName') if (VisitorName == null) { VisitorName = prompt("Qui êtes-vous ?"); SetCookie('VisitorName', VisitorName, exp); } return Nom du visiteur ; } function When(info){ var rightNow = new Date() var WWHTime = 0; WWHTime = GetCookie('WWhenH') WWHTime = WWHTime * 1 var lastHereFormatting = new Date(WWHTime); var intLastVisit = (lastHereFormatting.getYear() * 10000)+(lastHereFormatting.getMonth() * 100) + lastHereFormatting.getDate() var lastHereInDateFormat = "" + lastHereFormatting; " , " + dateMonth + " at " + timeOfDay SetCookie("WWhenH", rightNow.getTime(), exp) return WWHText } function Count(info){ var WWHCount = GetCookie('WWHCount') if (WWHCount == null) { WWHCount = 0 ; } autre{ WWHCount++; } SetCookie('WWHCount', WWHCount, exp); renvoie WWHCount ; } function set(){ VisitorName = prompt("Qui es-tu ?"); SetCookie('VisitorName', VisitorName, exp); SetCookie('WWHCount', 0, exp); SetCookie('WQuandH', 0, exp); } function getCookieVal(offset) { var endstr = document.cookie.indexOf(";", offset); if (endstr == -1) endstr = document.cookie.length ; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (nom) { var arg = nom + "="; var alen = arg.longueur; var clen = document.cookie.length; var je = 0; tandis que (je < clen) { var j = je + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); je = document.cookie.indexOf(" ", i) + 1; si (i == 0) pause ; } renvoie null ; } function SetCookie (nom, valeur) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expire = (argc > 2) ? argv[2] : nul; var chemin = (argc > 3) ? argv[3] : nul; var domaine = (argc > 4) ? argv[4] : nul; var sécurisé = (argc > 5) ? argv[5] : faux; document.cookie = nom + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ?" " : ("; path=" + chemin)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "" ); } function DeleteCookie (nom) { var exp = new Date(); exp.setTime(exp.getTime() - 1); var cval = GetCookie(nom); document.cookie = nom + "=" + cval + "; expires=" + exp.toGMTString(); } // Fin --> </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> document.write("Hello " + Who() + ". <br>您已经登录本站" + Count() + " 次了.<br>上次登录是:" + When() +"."); </SCRIPT>