jquery - Button Form Submit not working -
any ideas why wont submit form?(fyi dont want use input type='submit'), function call works.
<button onclick='submitform()'>save</button> function submitform() { alert('run'); //do more things $('form#myform').submit(); }
why don't go this:
<button>save</button>
and this:
$("button").click(function() { //change selector alert('hello'); $("form").submit();//change selector });
Comments
Post a Comment