javascript - JQuery enter event doesn't trigger form submission -


usually, when press enter on input inside form submit button triggers form submission, when tried same result calling jquery's trigger function doesn't work. idea why?

var ev =$.event('keydown',{keycode:13}); $('#myinput').trigger(ev); 

the event called form doesn't submit.

$('#id').on('change',function(){  document.getelementsbyname('formname').submit(); }); 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -