I have a problem, I want to call a function inside a textbox, when I press enter, this is my code
<input type="text" value="DIGITE O LOCAL" onclick="this.select()" size="20" id="endereco">
I want to put something like onenterpress="doSomething()"
How can I do this ?
If you want to use obtrusive Javascript:
Handling this unobtrusively:
Your best choice is to use the latter approach. It will aid in maintainability in the long run.
Reference: http://en.wikipedia.org/wiki/Unobtrusive_JavaScript