방문횟수 기억스크립트






<!-- 소스는 여기서부터...효과를 보시려면 나갔다가 다시 들어와보세요^^*--> <script language="JavaScript"> <!-- Hide this script from old browsers -- 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 (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (2 < argc) ? argv[2] : null; var path = (3 < argc) ? argv[3] : null; var domain = (4 < argc) ? argv[4] : null; var secure = (5 < argc) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function ResetCounts(name) { visits = 0; SetCookie("visits", visits, expdate , "/", null, false); location.reload(); } // -- End Hiding Here --> </script> <CENTER> <script language="JavaScript"> <!-- Hide this script from old browsers -- var expdate = new Date(); var visits; expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); if(!(visits = GetCookie("visits"))) visits = 0; visits++; SetCookie("visits", visits, expdate, "/", null, false); document.write("아하카페에 "+visits+" 번째 방문하셨군요."+"<br>"); if(visits == 1) document.write("<strong>"+"첫방문 환영합니다." +"</strong>"); if(visits == 2) document.write("또 찾아주셔서 감사합니다."); if(visits == 3) document.write("재미있는 카페죠^^"); if(visits == 4) document.write("하하하! 또 오셨군요."); if(visits == 5) document.write("이렇게 자주 오시다니!! "); if(visits == 6) document.write("우와!! 또 오셨어요^^"); if(visits == 7) document.write("엄청 자주 뵙네요~"); if(visits== 8) document.write("정말 또 오셨어요^^"); if(visits== 9) document.write("아예 여기서 사시죠^^!"); if(visits>=10) document.write("<strong>"+"너무나 감격스럽네요!! !"+"</strong>"); // -- End Hiding Here --> </script> <!-- 소스는 여기까지 -->