jquery提交form表单时,有一个属性提交为空。。。
form表单如下:
<form id="subForm" method="post">
<input type="hidden" id="type" name="msg.msgType" value=""/>
<input type="hidden" id="draft" name="msg.msgDraft" value=""/>
<table class="biaodan" style="width:80%;margin-bottom: 15px;border: 1px solid #eee;">
<tr>
<td width="400">
主题:<input name="msg.msgTitle" type="text" value="<s:property value="msg.msgTitle"/>" style="width:400"/>
</td>
</tr>
<tr>
<td>附件:<span id="fileQueue"></span><input type="file" name="upload" id="fileupload" /><ol id="files"></ol>
</td>
</tr>
<tr>
<td><textarea name="msg.msgContents" class="xheditor {upImgUrl:'<%=basePath%>/servlet/upload',submitID:'Save',height:350}" style="width:80%">
</textarea></td>
</tr>
</table>
</form>
提交:
function SaveAsDraft(btnId){
var type=$("#classify").val();
$("#type").val(type);
$("#draft").val(0);
$('#subForm').form('submit',{
url: '<%=basePath%>/admin/info/addInfo.do',
onSubmit: function(){
return $(this).form('validate');
},
success: function(data){
$.messager.alert('提示信息','已保存。');
parent.reloadParent("<%=parentTabId %>");
}
});
}
查看post参数如下:
msg.msgContents
msg.msgDraft 0
msg.msgTitle 22
msg.msgType 3
upload
为何就只有msgContents提交为空???纠结啊!