internet explorer - Why it doesn't work in IE 6-8 (catching Enter with jQuery) -


this code doesn't work in ie 6-8. why?

$(".put").keydown(function (e) {     if (e.keycode == 13) {         if ($(this).is(":focus")) {             $(this).submit().select();         }         return false;     } }); 

here's full page https://rawgithub.com/ruslankh/kurchatovy/master/index.html

thank :)

try using e.which() support browsers

 var code = e.which;   if(code == 13) { //enter keycode         if ($(this).is(":focus")) {             $(this).submit().select();         }         return false;  } 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -