JavaScript 取得網址列資訊
利用JavaScript 取得網址列資訊,
範例網址:http://localhost:80/test/index.php?n=1
location.href ->http://localhost:80/test/index.php?n=1
location.protocol ->http:
location.hostname ->localhost
location.host ->localhost:80
location.port ->80
location.pathname ->/test/index.php?n=1
location.search ->?n=1
參考或是複製語法時,別忘了留個言喔 ^ ^ ~