Skip to content

Instantly share code, notes, and snippets.

@huacnlee
Created August 3, 2010 01:14
Show Gist options
  • Save huacnlee/505647 to your computer and use it in GitHub Desktop.
Save huacnlee/505647 to your computer and use it in GitHub Desktop.
// 限制必须在iframe里面打开页面
// 此方法用户浮动iframe窗口的页面做限制,只有通过iframe才可以打开页面
// 禁止在iframe外打开
if (top.location == self.location) {
location.href = "/";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment