日期:2014-05-17  浏览次数:20353 次

解释一下这句代码意思
<script>this.parent.location.href='../login.aspx'</script>

------解决方案--------------------
<script>this.parent.location.href='../login.aspx'</script>
<script></script>中间的是javascript

this.parent.location.href='../login.aspx'
this代表本页面
.parent代表本页面的父页面(本页面是个弹出的小画面)
.location父页面的浏览器定位
.href定位的链接地址指向'../login.aspx'
../代表本页面所在文件夹层次的上一层.

哈哈解释得清楚吧



------解决方案--------------------
上面都解释完了。我就加一句。
this.parent.location.href多用在iframe里面跳转页面。
------解决方案--------------------
一把在iframe框架的子页面的js里写这样的代码,就是让父页面重新跳转到某页面,如果不加parent.那么就是子要么跳转了浏览器地址不变