jquery form create and submit code example
Example 1: put form action jquery
$('#button1').click(function(){
$('#formId').attr('action', 'page1');
});
$('#button2').click(function(){
$('#formId').attr('action', 'page2');
});
Example 2: create a form and submit it dynamically jquery
$(function() {
$('<form action="form2.html"></form>').appendTo('body').submit().remove();
});