0
sarah posted
jQuery form submit not working , why ?
Hii am using following form
<form action="demo_form.asp" id="name" method="get">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<button id="submit" name="submit" type="button" >Save</button>
</form>
js code as below
$("#submit").on('click',function(){
$(this).closest('form').submit();
});
but on click of the save button . nothing is happening . i want to submit form on click of the save.