If you are using in
asp.net project then use this code: )
<script type="text/javascript" language="javascript">
setInterval(automatic, 1000);
function
automatic() {
alert(Date);
document.getElementById("t1").value = parseInt(
document.getElementById("t1").value)
+ 1;
}
</script>
<asp:TextBox ID="t1" runat="server"
Text="0">
</asp:TextBox>