读书人

jquery交付form表单时有一个属性提交

发布时间: 2013-09-05 16:02:07 作者: rapoo

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.msgDraft0
msg.msgTitle22
msg.msgType3
upload
为何就只有msgContents提交为空???纠结啊! jsp,jquery,ajax

[解决办法]
用xheditor 编辑器了

读书人网 >JavaScript

热点推荐