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
Post a Comment