Light12306/Web12306/js/boot.js
2014-03-13 15:06:01 +08:00

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);