js 获取项目的 ip 和端口号

    //js 获取项目的 ip 和端口号

    var curWWWPath = window.document.location.href;
    var pathname = window.document.location.pathname;
    var pos = curWWWPath.indexOf(pathname);
    var localhostPath = curWWWPath.substring( 0, pos );

    console.log( localhostPath );

猜你喜欢

转载自blog.csdn.net/beguile/article/details/81482241
今日推荐