| 123456789101112131415161718192021222324252627282930313233 |
-
- function GetPath() {
- var curWwwPath = window.document.location.href;
- //为了便于前端测试,便宜行事的解决方案
- if (curWwwPath.indexOf("127.0.0.1") > 0) {
- var pathName = window.document.location.pathname;
- var pos = curWwwPath.indexOf(pathName);
- var localhostPaht = curWwwPath.substring(0, pos);
- var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
- var realPath = localhostPaht + projectName;
- return realPath;
- }
- else {
- return '';
- }
- }
- var hostPath = GetPath();
- document.write(" <link href=\"" + hostPath + "/css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\" />");
- document.write(" <link href=\"" + hostPath + "/css/indexs.css\" rel=\"stylesheet\" type=\"text/css\" />");
- document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/jquery-1.8.js\"></script>");
- document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/qrcode.min.js\"></script>");
- document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/common/huayi.config.js\"></script>");
- document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/common/huayi.http.js\"></script>");
- document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/jquery.xdomainrequest.min.js\"></script>");
- document.write("<!--[if lt IE 9]> <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/html5shiv.min.js\"></script> <![endif]-->");
- document.write("<!--[if lt IE 9]> <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/respond.min.js\"></script> <![endif]-->");
|