Hi,
I’m not sure what I did wrong with this but this doesn’t want to work. I follow the guideline of addEventListener perfectly but for some reason the addEventListener just doesn’t want to get execute. Any idea?
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<title>Untitled Document</title>
<script type=”text/javascript”>
document.addEventListener(“load”, countdown, true);
<!–
var start = 5;
var timer = start;
function countdown(){
if(timer > 0){
timer -= 1;
setTimeout(“countdown()”,1000);
}
else{
location.href=”
}
}
//–>
</script>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<body></body>
</html>
Thanks.