0

I have this script and i need some help

<script type='text/javascript'>
numcount=0;
t=setTimeout("test()",30000);
document.getElementById("incrementBtn").disabled=false;
timer_on = 1;

function increasecounter()
{
	timer_on = 1;
	numcount++;
	document.getElementById('countdiv').innerHTML=numcount;
	t=setTimeout("test()",30000);
}

function test()
{
	if(timer_on)
	{
		timer_on=0;
		document.getElementById("incrementBtn").disabled="true";
		document.getElementById("score").innerHTML = document.getElementById("countdiv").innerHTML;
	}	
}

function reset()
{
	timer_on = 0;
	numcount=0;
	document.getElementById("incrementBtn").disabled=false;
	document.getElementById("countdiv").innerHTML = 0;
	document.getElementById("score").innerHTML = "";
}
</script>
<title> New Document </title>
 </head>

 <body>
  <div id='countdiv'>0</div><br/>
	<input type="button" id="incrementBtn" onclick="increasecounter();" value="Increment"></br>
	<div id='time'></div>
	<div id='score'></div><br/>
	<input type='button' value='reset' onclick="reset()">
 </body>
</html>

now how do i make it so the amount of time that is left is shown in the 'time' div?
if anybody could help me i would be very, very, VERY thankful!

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by @developer
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.