//get base URL
            var _urlstr = window.location.href;
            if (_urlstr.indexOf("?") > -1) {
                _urlstr = _urlstr.substring(0, _urlstr.lastIndexOf("?"));
            }
            _urlstr = _urlstr.substring(0, _urlstr.lastIndexOf("/"));
            _urlstr = _urlstr.substring(0, _urlstr.lastIndexOf("/"));

例如:http://localhost:1781/tool/yakujihou.aspx

_urlstr为:http://localhost:1781

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2021-12-10
  • 2021-08-17
  • 2021-07-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-12-25
  • 2022-01-08
相关资源
相似解决方案