public ActionResult delImg(string url)
{
if (Request.IsAjaxRequest())
{
FileInfo file = new FileInfo(Server.MapPath(url));
if (file.Exists)
{
file.Delete();
return Content("1");
}
else
return Content("-1");
}
else
return Content("-1");
}
说明:这是https://www.cnblogs.com/denny402/p/3203300.html中介绍的Kindeditor加入删除图片的功能,其它JS都修改完成了,就是最后的图片删除过程