代码改变世界

js获取当前页面url

2008-10-11 08:20  Iron  阅读(163)  评论(0编辑  收藏  举报
<script>  
  alert("1:   "   +   window.location.href);  
  alert("2:   "   +   window.location);  
  alert("3:   "   +   location.href);  
  alert("4:   "   +   parent.location.href);  
  alert("5:   "   +   top.location.href);  
  alert("6:   "   +   document.location.href);  
  </script>