路徑
http://yaoxin.test.jidecai.com:10080/h/rule/ranger.html
效果圖
傳參前邊的URL:window.location.origin(可用來動態獲取接口)
"http://yaoxin.test.jidecai.com:10080"
域名 + 端口:window.location.host
"yaoxin.test.jidecai.com:10080"
當前URL:window.location.href
"http://yaoxin.test.jidecai.com:10080/h/rule/ranger.html"
協議:window.location.protocol
"http:"
傳參前邊的URL:window.location.origin
"http://yaoxin.test.jidecai.com:10080"
域名:window.location.hostname
"yaoxin.test.jidecai.com"
端口:window.location.port
"10080"
路徑部分:window.location.pathname
"/h/rule/ranger.html"
請求的參數:window.location.search
""