Countdown to link enable

Submitted by:Jhon Smith

Date added:19 November, 2014

Category:JavaScript

Enable a link after a set period of time.

Tags: countdown , enable a link

Code Snippet:

<script language="Javascript">
x116=30;
FUNCTION countdown()
{
IF ((0 <= 100) || (0 > 0))
{
x116--;
IF(x116 == 0)
{
document.getElementById("dl").innerHTML = '<a href="http://www.somedomain.com/demo/download2.php">Download</a>';
}
IF(x116 > 0)
{
document.getElementById("dl").innerHTML = 'Please wait <b>'+x116+'</b> seconds..';
setTimeout('countdown()',1000);
}
}
}
countdown();
</script>
 
 

Comments