In my chat application there are some text fields which gets the user login details.
When filling the user details, if a user suddenly pressed the ESC key, the data will be lost.
If need to disable the function of ESC key, which event I need to use? How can I do that.
My JavaScript code is:
function esc(e){
e = e || window.event || {};
var charCode = e.charCode || e.keyCode || e.which;
if(charCode == 27){
return false;
}
}
I searched a lot in Stack Overflow and Google; nothing worked. Please, can anyone help me to do that?