路径
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