I searched for two hours and I could not find any solutions.
I would like to have two submit buttons, one inside the <form> and one outside the <form>.
<form id="example" name="example" action="post"> Input <input type="text" name="text" /> <input type="submit" name="submit" value="submit" /> </form> <div class="button">Submit</div>
Js / jquery
$(".button").click( function() { alert("Button clicked"); });
How can I submit a form with a class (.button) outside the form?
JS Fiddle here: http://jsfiddle.net/ZQLXb/
Peter source share