自己写的AjaxForm
时间:2010-11-21 来源:humble
$.AjaxForm('<%=Url.Content("~/Utility/PicUploadHander.ashx")%>', 'UpLoadForm', function (str) {
var json = eval('(' + str + ')');
alert(json.Name);
parent.Home();//主页面的方法
});
private void WriteForm(string str, HttpContext context)
{
string method = context.Request["callbackmethod"];
string isJson = context.Request["isJson"];
string hs = "<script> void " + method + " ('" + str + "');</script>";
context.Response.Write(hs);
context.Response.Flush();
context.Response.Close();
}
相关阅读 更多 +