JS获取链接中域名等信息
2021-06-18 15:26
标签:例子 win res hone 域名 host location 获取 code 以访问百度为例子http://pan.baidu.com/share/qrcode?w=150&h=150&url=http%3A%2F%2F172.16.1.96%2FWeb%2FGetUserOrdersInfo%3Ftelephone%3D18814129365%26reserveID%3D21 获取链接中的域名等信息:window.location.(xxx) 其中(xxx)可以是一下内容: hash: "" search: "?w=150&h=150&url=http%3A%2F%2F172.16.1.96%2FWeb%2FGetUserOrdersInfo%3Ftelephone%3D18814129365%26reserveID%3D21" JS获取链接中域名等信息 标签:例子 win res hone 域名 host location 获取 code 原文地址:http://www.cnblogs.com/qq5705/p/7207416.html
host: "pan.baidu.com"
hostname: "pan.baidu.com"
href: "http://pan.baidu.com/share/qrcode?w=150&h=150&url=http%3A%2F%2F172.16.1.96%2FWeb%2FGetUserOrdersInfo%3Ftelephone%3D18814129365%26reserveID%3D21"
origin: "http://pan.baidu.com"
pathname: "/share/qrcode"
port: ""
protocol: "http:"