js 獲取服務器ip


參考:https://blog.csdn.net/u012664198/article/details/82700024

      var urlPath = window.document.location.href;  //瀏覽器顯示地址 http://10.15.5.83:5555/ISV/demo.aspx?a=1&b=2
        var docPath = window.document.location.pathname; //文件在服務器相對地址 /ISV/demo.aspx
        var index = urlPath.indexOf(docPath);
        var serverPath = urlPath.substring(0, index);


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM