23 lines
569 B
JavaScript
23 lines
569 B
JavaScript
//12306入口引导脚本
|
|
|
|
(function (window, document) {
|
|
var basePath = window.location.protocol + "//" + window.location.host + location.pathname + "/js/";
|
|
|
|
var loadScript = function (path, callback) {
|
|
var script = document.createElement("script");
|
|
script.src = basePath + "/" + path;
|
|
script.onreadystatechange = function () {
|
|
if (script.readyState === 4) {
|
|
callback();
|
|
}
|
|
document.head.removeChild(script);
|
|
};
|
|
document.head.appendChild(script);
|
|
};
|
|
|
|
loadScript("modules/", function () {
|
|
|
|
});
|
|
|
|
})(window, document);
|