location.search
location.search
返回URL的查询部分。假设当前的URL就是http://www.runoob.com/submit.htm?email=someone@ example.com:
<script>
document.write(location.search);
</script>
以上实例输出结果:
?email=someone@example.com
赞 (0)
返回URL的查询部分。假设当前的URL就是http://www.runoob.com/submit.htm?email=someone@ example.com:
document.write(location.search);
</script>
以上实例输出结果: