日期:2014-05-16  浏览次数:20277 次

为什么我的URL用document.URL显示出来的没有了querystring?
这个是我做的一个链接:
<a   href= "n.html?name1=value1&name2=value2&name3=value3 "> click   here </a>
跳转后地址栏显示的是:
file:///E:/js/n.html?name1=value1&name2=value2&name3=value3
可是我用document.write(document.URL);
显示的却是:
file://E:\js\n.html
后面那些字符串去什么地方了?谢谢。

------解决方案--------------------
<script language=javascript>
document.write(document.location.href);
</script>
------解决方案--------------------
document.write(document.URL + document.location.search);
------解决方案--------------------
document.wrte(location);