check for key presses html onkeypress code example Example: html onkeypress <input type="text" onkeypress="myFunction()">