Torna al Thread

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="it"> <head> <title>Link obbligatorio - Esempio JavaScript scaricato da HTML.it</title> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Language" content="it" /> <meta name="Robots" content="All" /> <meta name="Description" content="HTML.it - il sito italiano sul Web publishing" /> <meta name="Keywords" content="Lo script obbliga l'utente a cliccare su un banner o su un link testuale prima di poter accedere ad un'altra pagina. Lo script può anche essere applicato su link multipli che, una volta cliccati, permettono di accedere alla pagina definitiva." /> <meta name="Owner" content="HTML.it srl" /> <meta name="Author" content="HTML.it srl" /> <meta name="Copyright" content="HTML.it srl" /> <SCRIPT LANGUAGE="JavaScript"> <!-- function Get_Cookie(name) { var start = document.cookie.indexOf(name+"="); var len = start+name.length+1; if ((!start) && (name != document.cookie.substring(0,name.length))) return null; if (start == -1) return null; var end = document.cookie.indexOf(";",len); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(len,end)); } function Set_Cookie(name,value,expires,path,domain,secure) { document.cookie = name + "=" +escape(value) + ( (expires) ? ";expires=" + expires.toGMTString() : "") + ( (path) ? ";path=" + path : "") + ( (domain) ? ";domain=" + domain : "") + ( (secure) ? ";secure" : ""); } function AllowAccess(clix) { if (clix < 1) { alert("Devi cliccare prima il banner !\nHai cliccato : " + clix + " volte."); return false; } else { return true; } } function CountClick() { var curclix = Get_Cookie('clix'); curclix = curclix - (-1); Set_Cookie('clix', curclix); } Set_Cookie('clix', 0); //--> </SCRIPT> </head> <body > <br /><br /> <div align="center"> <div align="center"><A HREF="http://forum.html.it " target="_blank" onclick="CountClick();"><img src="chat.gif " border="0" ></A><BR><br><br> <A HREF="http://www.html.it " onclick="return (AllowAccess(Get_Cookie('clix')))">Visita Html.it </A></div> </div> <br /><br /><br /><br /><br /><br /> <div align="center"> <a href="http://www.html.it"><img src="logo_htmlit.gif" alt="JavaScript scaricato da HTML.it" border="0" width="50" height="50" /></a> </div> </body> </html>
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5