当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

easyui带file上传控件表达提交

到easyui官网下载jquery.easyui.min.js引入到项目中:

<script src="/jquery.easyui.min.js"></script>

 

js代码:

$("#infoWindow").form("submit", {
        url: "/api/Files/ReceiveFile/?t=" + new Date().getTime(),
        onSubmit: function (params) {
            return true;
        },
        success: function (data) {
            if (data != "undefined") {
                var json = eval('(' + data + ')');
                console.log(JSON.stringify(json));

                layer.msg(json.msg);
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            }
            else {
                layer.msg(data);
            }
        },
        error: function () {

        }
    });

 

posted @ 2020-04-25 12:43  hofmann  阅读(251)  评论(0编辑  收藏  举报