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