»
EnglishFrenchVietnamese

Print - Visit Counter - JavaScriptBank.com

Full version: jsB@nk » Cookie » Visit Counter
URL: https://www.javascriptbank.com/visit-counter.html

Visit Counter © JavaScriptBank.comThis cookies records how many times the visitor has visited the page and writes to the page accordingly.

Full version: jsB@nk » Cookie » Visit Counter
URL: https://www.javascriptbank.com/visit-counter.html



CSS
<style>.counter{background-color:black;color:yellow;font-weight:bold;}</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT>expireDate = new DateexpireDate.setMonth(expireDate.getMonth()+6)jcount = eval(cookieVal("jaafarCounter"))jcount++document.cookie = "jaafarCounter="+jcount+";expires=" + expireDate.toGMTString()function cookieVal(cookieName) {thisCookie = document.cookie.split("; ")for (i=0; i<thisCookie.length; i++){if (cookieName == thisCookie[i].split("=")[0]){return thisCookie[i].split("=")[1]}}return 0}function page_counter(){for (i=0;i<(7-jcount.toString().length);i++)document.write('<span class="counter">0</span>')for (y=0;y<(jcount.toString().length);y++)document.write('<span class="counter">'+jcount.toString().charAt(y)+'</span>')}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<b>You visited this page <SCRIPT>page_counter(jcount);</SCRIPT> time(s).</b><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->