ajaxfileupload.js异步上传文件插件(完整demo)

HTML:


JS:

//点击上传图片
$('#salesman-submit').on('click',function(){ 
       jQuery.ajaxFileUpload({
            url: "http://d.100m.net/100msh_wifi_alone/salesman/add",
            files: $(':file'),
            data: {},
            dataType: "json",
            success: function(data) {
                alert(data.file.tmp_name);
            }, error: function(data, status, e) {
                alert(e);
            }
        });
});

ajaxfileupload.js

/**
*    页面无刷新上传文件
*    修改版(支持多文件批量上传) 
*/
jQuery.extend({
    createUploadIframe: function(id, uri) {
        var frameId = 'jUploadFrame' + id;
        var iframeHtml = '