$("#xx_User_content_qianming").ajaxSubmit({ type: ‘POST‘, url: ‘后台方法路径‘, success: function (result) { console.log(result); if (result.s) { com.message(‘s‘, result.message); km.xx_User.reload(); } else { com.message(‘e‘, result.message); } } });
public JsonResult SaveUserInfo() { string p = Server.MapPath("/"); //判断是否存在文件 if (Request.Files.Count>0) { p = p + "\\data\\电子签名\\" + Request.Params["department_id"].ToString().ToString() ; var savePath=p+ "\\" + Request.Params["id"].ToString() + "_qianming.png"; if (!System.IO.Directory.Exists(p)) System.IO.Directory.CreateDirectory(p); //文件保存 Request.Files[0].SaveAs(savePath); }return JsonNet(new { s = 1, msg="ok" }); }
原文:https://www.cnblogs.com/dreamsails/p/12767451.html