<script type="text/javascript">
/*********************************************** * Display time of last visit script- by JavaScriptKit.com * This notice MUST stay intact for use * Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and more ***********************************************/
var lastvisit=new Object() lastvisit.firstvisitmsg="ȯ¿µÇÕ´Ï´Ù. ´ç½ÅÀº ÀÌ »çÀÌÆ®¸¦ ù ¹ø° ¹æ¹®Çϼ̽À´Ï´Ù." //Change first visit message here lastvisit.subsequentvisitmsg="ȯ¿µÇÕ´Ï´Ù. ÇöÀç ¼Õ´ÔÀº ÀÌ »çÀÌÆ®ÀÇ ¸¶Áö¸· ¹æ¹®½Ã°£Àº<b style=color:blue> [displaydate] </b>ÀÔ´Ï´Ù." //Change subsequent visit message here
lastvisit.getCookie=function(Name){ //get cookie value var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair if (document.cookie.match(re)) //if cookie found return document.cookie.match(re)[0].split("=")[1] //return its value return "" }
lastvisit.setCookie=function(name, value, days){ //set cookei value var expireDate = new Date() //set "expstring" to either future or past date, to set or delete cookie, respectively var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days)) document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/"; }
lastvisit.showmessage=function(){ if (lastvisit.getCookie("visitcounter")==""){ //if first visit lastvisit.setCookie("visitcounter", 2, 730) //set "visitcounter" to 2 and for 730 days (2 years) document.write(lastvisit.firstvisitmsg) } else document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", new Date().toLocaleString())) }
lastvisit.showmessage()
</script>
|