ajax 方法后台前台交互
// 异步AJAX方法
$.ajax({
type: "Post",
url: "UpLoadFile.aspx/Delete",
async: true,
//方法传参的写法一定要对,与后台一致,区分大小写,不能为数组等,id为形参的名字
data: "{'id':'" + id + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
//返回的数据用data.d获取内容
alert(data.d);
window.location.reload();
},
error: function (err) {
alert(err);
}
});
http://www.cnblogs.com/qfcndtt/archive/2013/02/27/2935520.html

浙公网安备 33010602011771号