日期:2014-05-17 浏览次数:20615 次
function upload() {
            var obj = document.getElementById("form1");
            obj.action = "/Handler/UploadImage.ashx";
            obj.target = "Ihiden";
            obj.enctype = "multipart/form-data";
            obj.submit();
        }
Hashtable hash = new Hashtable();
        hash["error"] = 0;
        hash["url"] = fileUrl;//保存在服务器上的路径
        context.Response.AddHeader("Content-Type", "text/html; charset=UTF-8");
        context.Response.Write(JsonMapper.ToJson(hash));
        context.Response.End();