您好,欢迎来到五一七教育网。
搜索
您的当前位置:首页防止登录页面出现在frame中_html/css

防止登录页面出现在frame中_html/css

来源:五一七教育网


在使用frame页面嵌套开发的时候,遇到重启了服务器的时候会出现登录页面在frame页面中出现,

所以需要在登录页面里面用js判断下当前的地址信息,然后跳转到登录的单独页面中。


js代码如下:

$("document").ready(function(){	//防止在frame里面出现登录页面	if(top.location!==self.location){ 	//alert(top.location); 	//alert(self.location); 	top.location.href=self.location.href; 	} 	});

Copyright © 2019- 517ttc.cn 版权所有 赣ICP备2024042791号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务