Does anyone know how can I remove keypress from input with jquery?
Example:
<input type="text" keypress="cleanMsg()" id="cleanMsg" name="cleanMsg">
How can I removed the keypress=”cleanMsg()” from input by using jquery? Or anyway to replace keypress=”cleanMsg()” to keypress=”Msg()”??
I assume you mean “how do you remove the ‘keypress’ attribute from the input”, in which case this would work
If you want to bind to a keypress, you should do it in the jQuery way (refer to the docs), with this code the above attribute within the input tag is redundant