window.location.search.substring(1); 什么意思,
分享于 点击 41398 次 点评:152
window.location.search.substring(1); 什么意思,
var qs = window.location.search.substring(1);//获得了当前链接的中?号后的参数
if (qs.length > 0) {
var Airways = qs.substring(qs.indexOf('=') + 1).toUpperCase();
location.search的值就是 "?i=1 "
substr(1) 就是从索引1开始截取
所以以这个页面为例的话location.search.substring(1)的值就是 "i=1 "
相关文章
- 暂无相关文章
用户点评