input type text onkeypress javascript code example Example: html onkeypress <input type="text" onkeypress="myFunction()">