民权县12345_前端

huayi.load.js 1.8KB

123456789101112131415161718192021222324252627282930313233
  1. 
  2. function GetPath() {
  3. var curWwwPath = window.document.location.href;
  4. //为了便于前端测试,便宜行事的解决方案
  5. if (curWwwPath.indexOf("127.0.0.1") > 0) {
  6. var pathName = window.document.location.pathname;
  7. var pos = curWwwPath.indexOf(pathName);
  8. var localhostPaht = curWwwPath.substring(0, pos);
  9. var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
  10. var realPath = localhostPaht + projectName;
  11. return realPath;
  12. }
  13. else {
  14. return '';
  15. }
  16. }
  17. var hostPath = GetPath();
  18. document.write(" <link href=\"" + hostPath + "/css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\" />");
  19. document.write(" <link href=\"" + hostPath + "/css/indexs.css\" rel=\"stylesheet\" type=\"text/css\" />");
  20. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/jquery-1.8.js\"></script>");
  21. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/qrcode.min.js\"></script>");
  22. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/common/huayi.config.js\"></script>");
  23. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/common/huayi.http.js\"></script>");
  24. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/jquery.xdomainrequest.min.js\"></script>");
  25. document.write("<!--[if lt IE 9]> <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/html5shiv.min.js\"></script> <![endif]-->");
  26. document.write("<!--[if lt IE 9]> <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/respond.min.js\"></script> <![endif]-->");