iframe或者frameset 中的页面在跳转后显示在最外层,例如登陆校验时跳转到登陆页面,应该在最外层显示,而不是加载在iframe中显示。
<script language="javascript">
window.onload=function(){
if(self!=top){
top.location.href="login";
}
}
</script>
iframe或者frameset 中的页面在跳转后显示在最外层,例如登陆校验时跳转到登陆页面,应该在最外层显示,而不是加载在iframe中显示。
<script language="javascript">
window.onload=function(){
if(self!=top){
top.location.href="login";
}
}
</script>