Write a JavaScript Code to Create a Timer onload.
<html> <head> <script type="text/javascript"> var c=0 var t function timedCount() { document.getElementById('txt').value=c c=c+1 t=setTimeout("timedCount()",1000) } function stopCount() { clearTimeout(t) } function disp() { t = new Date() document.form1.txttime.value=t.getSeconds(); s=setTimeout("disp()",1000); } </script> </head> <body onload="disp()"> <form> <input type="button" value="Start count!" onClick="timedCount()"> <input type="text" id="txt"> <input type="button" value="Stop count!" onClick="stopCount()"> </form> <br> <form name="form1"> <input type="text" name="txttime"> </form> </body> </html>