当前位置:Gxlcms > html代码 > 防止登录页面出现在frame中_html/css_WEB-ITnose

防止登录页面出现在frame中_html/css_WEB-ITnose

时间:2021-07-01 10:21:17 帮助过:3人阅读

在使用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; 				} 							});

人气教程排行