I have to call a method when "enter" key is pressed anywhere in page but i don't want register any method call in each text box. I know it can be done by jQuery like this
$(document).keypress(function(e) {
if(e.which == 13) {
// enter pressed
}
});
Kindly tell me how can I write same version of this code in plain javascript? Thanks in advance