dikri100 0 Newbie Poster

I can code it with this account just click on a link
I need one that relies on various link on the same page. codigo need cookie.


<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" />

Click <a href="http://www.google.com.com"target=_"blank" onclick="conta();"> </ a >

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.