html event by press key code example Example: html onkeypress <input type="text" onkeypress="myFunction()">