<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <title></title>
<script type="text/javascript">
var c = 0;
var t;
var timer_is_on = 0;
function timedCount()
{
document.getElementById('txt').value = c;
c = c + 1;
t = setTimeout("timedCount()", 1000);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<input type="button" value="Start count!" onClick="timedCount()">
<input type="text" id="txt">
</form>
</body>
</html>