$('#form').serialize() = ""
私は私のajax呼び出しの後に取得します:
$('#continueBtn').bind('click', function () {
var url = $('#form').attr('action') + setFlowEvent('continue');
$.ajax({
type : "POST",
url : url,
cache:false,
data: $('#form').serialize(),
dataType: "html",
success : function(response) {
var newContent = $($.parseHTML(response)).find("#ajax-content");
$('#ajax-content').html(newContent);
bindAjaxSubmit();
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert("error!");
}
});
});
そして、次のjspコードがあります:
<div id="ajax-content">
<form:form id="form" modelAttribute="model" action="${actionURL}" method="post">
<input id="field1" type="text" value="1" name="field1"></input>
<input id="field2" type="text" value="2" name="field2"></input>
<button id="continueBtn">continue</button>
</form:form>
</div>