JS uploadPropic

function uploadPropic(file) {
        $.ajaxFileUpload({
            url: "/InFo/Uploadpropic",
            secureuri: false,
            datatype: 'JSON',
            fileElementId: file.id,
            success: function (data, status) {
                var json = jQuery.parseJSON(jQuery(data).text());
                if (json.result == "1") {
                    document.getElementById("proImg").src = json.path;
                    document.getElementById("ImageID").value = json.path;
                    alert("尊敬的伙伴,“e挖小蜜蜂”提醒您:" + json.msg);
                }
                else {
                    alert("尊敬的伙伴,“e挖小蜜蜂”提醒您:" + json.msg);
                }

            },
            error: function (data, status, e) {
                alert("尊敬的伙伴,“e挖小蜜蜂”提醒您:上传失败");
            }
        });
    }

 

posted @ 2017-05-15 13:15  冫凌晨  阅读(248)  评论(0编辑  收藏  举报