I am very new to Javascript, Basically i want to call a simple javascript event on keypress of function keys in the keyboard. The below code provides the current date and time on click of a button, Similarly can we call a javascript event on keypress of function keys?
<input type = "text" onkeypress="document.getElementById('demo').innerHTML=Date()">The time is?
<p id="demo"></p>