javascript - Submit not triggered on enter the text box after filling the value. in IE -



javascript - Submit not triggered on enter the text box after filling the value. in IE -

i have form, in form there 1 text field. after field filled user pressing come in key. form not submit in ie8 how prepare this.

but works fine chrome , firefox.

example code :

<form> <label><input type="text" /></label> <input value="enter after adding value" type="submit"> </form>

how create ie work on come in key pressed.

thanks in advance!

some browsers default allow come in key submit form, others not.

you can work around adding event handler submit form on come in key. seek like

$("input").keypress(function(e) { if (e.which == 13) { e.preventdefault(); $("form").submit(); } });

if have multiple forms on page, ensure add together id attribute , update above code accordingly.

javascript jquery html internet-explorer

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -