$.ajax({
type:"post",
url:"action/addc.a",
data:{caption:paracaption,remark:pararemark},
dataType:"json",
success:function(data){
alert(JSON.stringify(data));
alert(data.msgtype);
},
error:function(XMLHttpRequest, textStatus, errorThrown){
alert(errorThrown);
}
});
jauery方法
$.ajaxSetup({
async: false
});
$("#btnSubmit").click(
function(){
$.post(
"url",
{
data
},
function(msg){
}
);
}
);