//获取当前窗口的Url
//returnUrl=http://localhost:8080/shopping/buyCart.shtml?skuId=510&amount=1
window.location.href
//获取当前窗口的主机名 例如:http://localhost:8080
window.location.host
//获取当前窗口的端口 例如: 8080
window.location.port
//获取当前窗口的路径 例如: /shopping/buyCart.shtml
window.location.pathname
//获取当前文档的Url
document.URL
//获取参数 例如: ?skuId=510&amount=1
window.location.search
//跳出当前窗口,打开新窗口
window.open(url);
版权声明:本文为CSDN博主「Ashan-Da宝旗」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zhao13083837081/article/details/52881331