======获取当前地址和转向地址=====
<script type="text/javascript">
function currLocation()
{
alert(window.location)
}
function newLocation()
{
window.location="/index.html"
}
</script>
<body>
<input type="button" οnclick="currLocation()" value="显示当前的 URL">
<input type="button" οnclick="newLocation()" value="转向 URL">
</body>
</html>
-----------------------frame页可以用 window.parent.frames.mainFrame.location.reload() //刷新-------