Hello I have a code that counts the click of a particular link but only one per page
But he precizo count on several link on the same page
<script type="text/javascript" src="file:///D|/Downloads/cookie.js"> </ script>
<script type="text/javascript">
var = CookieUtil
{
get: function (name)
{
var cookieName = encodeURIComponent (name) + "="
cookieStart = document.cookie.indexOf (cookieName)
CookieValue = null;
if (cookieStart> -1)
{
var = document.cookie.indexOf cookieEnd (";", cookieStart);
if (cookieEnd == -1)
{
cookieEnd = document.cookie.length;
}
CookieValue decodeURIComponent = (document.cookie.substring (cookieStart + cookieName.length, cookieEnd));
}
return CookieValue
}
set: function (name, value, expires, path, domain, secure)
{
var cookieText = encodeURIComponent (name) + "=" + encodeURIComponent (value);
if (expires instanceof Date)
{
cookieText + = "; expires =" + expires.toGMTString ();
}
if (path)
{
cookieText + = ", path =" + path;
}
if (domain)
{
cookieText + = ", domain =" + domain;
}
if (secure)
{
cookieText + = "; secure";
}
document.cookie = cookieText;
}
unset: function (name, path, domain, secure)
{
this.set (name, "", new Date (0), path, domain, secure);
}
}
var vCont = -0;
window.onload = function ()
{
var counter = CookieUtil.get ('counter');
if (count! = null)
{
document.getElementById ('counter'). value = counter;
vCont = parseInt (count);
}
if (counter == null)
{
vCont = 0;
}
}
function account ()
{
vCont vCont = + 1;
document.getElementById ('counter'). vCont = value;
CookieUtil.set ('counter', vCont);
return false;
}
</ Script>
<input id="contador" size="5" />
<a href="http://www.google.com"target=_" blank" onclick="conta();"> Click </ a >