87,919
社区成员
发帖
与我相关
我的任务
分享
function note() {
this.id = document.getElementById("id").value;
this.title = document.getElementById("title").value;
this.content = encodeURIComponent(UE.getEditor('editor').getContent());
this.starttime = $('#starttime').datetimebox('getValue');
this.endtime = $('#endtime').datetimebox('getValue');
}
//按提交时实行以下代码
function savedata() {
var n = new note();
$.ajax({
type: "POST",
url: "test2.aspx",
//下面不知写对不对
data: eval(n),
contenttype: "json",
success: function (msg) {
if (msg != "99999") {
parent.document.getElementById("messagetitle").value = "提示";
parent.document.getElementById("messagecontent").value = "数据提交成功!";
parent.bottomRight();
}
else
$.messager.alert("警告", "数据提交不成功!");
}
});
}
//后台能不能这样接收到
string jsonStr = Request["n"];
array('id'=>document.getElementById("id").value对应的值,
'title'=>document.getElementById("title").value对应的值,
'content '=>encodeURIComponent(UE.getEditor('editor').getContent())对应的值,
'starttime '=>$('#starttime').datetimebox('getValue')对应的值,
'endtime'=>$('#endtime').datetimebox('getValue')对应的值
)