The modern way: new URL("http://example.com/aa/bb/"). Returns an object with properties hostname and pathname , along with a few others.
確定! 回上一頁