url = "http://127.0.0.1:80/index.html"
console.log(location.href)
/* http://127.0.0.1:80/index.html */
console.log(location.protocol)
/* http: */
console.log(location.hostname)
/* 127.0.0.1 */
console.log(location.port)
/* 80 */
console.log(location.pathname)
/* /index.html */
LX DevBlog
AboutBrowser URL’s
12/16/2024
Javascript