假如URL为http://www.baidu.com/index.html?p1=fk&p2=sht

则通过JS代码获得?后面的参数串语句为:document.location.search 

得到结果为:?p1=fk&p2=sht(注意是带问号的

 

兼容所有浏览器。

相关文章:

  • 2021-08-20
  • 2021-10-22
  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
猜你喜欢
  • 2021-11-20
  • 2021-12-30
  • 2021-06-03
  • 2022-12-23
相关资源
相似解决方案