js获取当前页面的url网址信息
window.location.href
2、设置或获取与URL关联的端口号码:
window.location.port
3、设置或获取URL的协议部分
window.location.protocol
4、设置或获取href属性中跟在问号后面的部分
window.location.search
5、获取变量的值(截取等号后面的部分)
varurl=window.location.search;
//alert(url.length);
//alert(url.lastIndexOf('='));
varloc=url.substring(url.lastIndexOf('=')+1,url.length);
6、设置或获取URL的协议部分:
window.location.protocol
7、设置或获取href属性中在井号“#”后面的分段:
window.location.hash
8、设置或获取location或URL的hostname和port号码:
window.location.host
热门推荐
10 财运虎年祝福语简短语
11 单亲爸爸春节祝福语简短
12 狗狗上厕所训练
13 植物种植祝福语简短
14 翻译考试祝福语朋友简短
15 个人周年庆简短祝福语
16 狗狗怎么训练
17 分别祝福语简短搞笑英文
18 生日广州男生祝福语简短