$.ajax({ cache: true, type: "POST", url:ajaxCallUrl, data:$('#yourformid').serialize(),// 你的formid async: false, error: function(request) { alert("Connection error"); }, success: function(data) { $("#commonLayout_appcreshi").parent().html(data); } });alert(para4);
alert($('#frmForm1').serialize());
$.ajax({
cache: true, //是否缓存
type: "POST",
url: "forummainsb.jsp",
data: $("#frmForm1").serialize(),// 你的formid
dataType:"json", //数据传送格式
contentType:"GBK", //编码格式
async: false, //默认设置下,所有请求均为异步请求。如果需要发送同步请求,请将此选项设置为 false。
//注意,同步请求将锁住浏览器,用户其它操作必须等待请求完成才可以执行
error: function(request) {
alert("Connection error");
},
success: function(data) {
//$("#commonLayout_appcreshi").parent().html(data);
alert(data);
}
});