javascript:重新加载js文件

 //重新加载js文件
        function loadJs(file) {
            var head = $("head").remove("script[role='reload']");
            $("<scri" + "pt>" + "</scr" + "ipt>").attr({ role: 'reload', src: file, type: 'text/javascript' }).appendTo(head);
        }

原文地址:https://www.cnblogs.com/yuanxianlai/p/2494831.html