Rajashekhar@CDAC
Thursday, 19 January 2012
counting the number of times a user has visited a page in HTML 5
<script type="text/javascript">
if (localStorage.pagecount)
{
localStorage.pagecount=Number(localStorage.pagecount) +1;
}
else
{
localStorage.pagecount=1;
}
document.write("Visits "+ localStorage.pagecount + " time(s).");
</script>
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)