jquery.upload2 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
jquery.upload2 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
jquery.upload2 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT
开发语言 JavaScript
操作系统 跨平台
软件类型 开源软件
开源组织
地区 国产
投 递 者 漫漫洒洒
适用人群 未知
收录时间 2015-06-15

软件简介

异步上传文件,兼容IE8,火狐和谷歌可用,如果可以使用h5则使用h5(h5时显示上传进度)

实现单个多次上传不刷新。





无标题文档




    function look() {
        //alert($("form input[type=file]").val())
        alert($("input[name=test]").upload("getFileVal"))
    }
    function clean() {
        $("input[name=test]").upload("clean")
    }
    function ajaxSubmit() {
        $("input[name=test]").upload({
            url: 'index.aspx',
            // 其他表单数据
            params: { name: 'pxblog' },
            // 上传完成后, 返回json, text
            dataType: 'json',
            onSend: function (obj, str) {  return true; },
            // 上传之后回调
            onComplate: function (data) {
                alert(data.file);
            }
        });
        $("input[name=test]").upload("ajaxSubmit")
    }


    function look1() {
        //alert($("form input[type=file]").val())
        alert($("input[name=test1]").upload("getFileVal"))
    }
    function clean1() {
        $("input[name=test1]").upload("clean")
    }
    function ajaxSubmit1() {
        $("input[name=test1]").upload({
            url: 'index.aspx',
            // 其他表单数据
            params: { name: 'pxblog' },
            // 上传完成后, 返回json, text
            dataType: 'json',
            onSend: function (obj, str) { return true; },
            // 上传之后回调
            onComplate: function (data) {
                alert(data.file);
            }
        });
        $("input[name=test1]").upload("ajaxSubmit")
    }




    

    

    

    

 

源码地址:http://code.taobao.org/svn/upload2/jquery.upload2.js

展开阅读全文

代码

评论

点击加入讨论🔥(2) 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
2 评论
16 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部