window.location.search.substring(1)

window.location.search.substring(1);

功能为获取当前页面GET方式请求 ? 后的指定参数,比如传递过来的GET请求是 "test.html?name=22&id=11"

那么在当前页面调用函数 

var lsw=window.location.search.substring(1);

// lsw的值为 name=22&id=11

猜你喜欢

转载自blog.csdn.net/jia13475881149/article/details/114242900
今日推荐