seanacnet.com
[JS]如何用Javascript 取得網址目前的網域名稱 location host
如何用 JS 取得網址(URL)中的網域名稱(domain name),在 location 中有兩個可以使用,分別為 host 與 hostname,location.host 的執行結果如下:
米糕