Location.search的定义和用法:
search属性是一个可读可写的字符串,可设置或返回当前URL的查询部分(
问号?及其之后的部分)
实例
返回URL的查询部分。假设当前的URL就是
http://www.runoob.com/submit.htm
?email=someone@ example.com
<script>
document.write(location.search);
</script>
返回的结果为:
?email=someone@example.com