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 () {

        }
    });
原文地址:https://www.cnblogs.com/hofmann/p/12772588.html