<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>javascript</title> </head> <body > <!--onchange, onclick, onmouseover, onmouseout, onkeydown, onload --> <input type="text" onkeydown="show ()"> <h1 id="myid"></h1> <script type="text/javascript"> function show () { document.getElementById("myid").innerHTML=Date() } </script> </body> </html>