zero0x píše:
v cistom html nie je mozne vytvorit pocitadlo, pretoze data sa musia niekde uchovavat a html/jscript nema pravo kamkolvek zapisovat
dal som si tu namahu ten skript najst a nasiel som, videl som este inu verziu ale to uz neviem najst, no mozno najdem niekedy....
Kód:
<!-- This script has been in the http://www.javascripts.com Javascript Public Library! -->
<!-- Note that though this material may have been in a public depository, certain author copyright restrictions may apply. -->
<HTML>
<HEAD>
<TITLE>Javascript Counter v1.0</TITLE>
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!-- By David Hyman -->
<!-- Hide script from older browsers
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
hitCt = eval(cookieVal("pageHit"))
hitCt++
document.cookie = "pageHit="+hitCt+";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
}
// End hiding script -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR=WHITE>
<H2>
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from older browsers
document.write("You have visited this page " + hitCt + " times.")
// End hiding script -->
</SCRIPT>
</H2>
</BODY>
</HTML>
<!-- Simba says Roar. -->
Ale ako som povedal pocita len zobrazene stranky....je to uplne jednoduche pocitadlo, takze ma tu nezdrbte zato ze to nepocita unikatnych navstevnikov a pod....
Vyskusať