简体   繁体   English

在iFrame中将父页面滚动到顶部

[英]Scroll parent page to top from within iFrame

I'm trying to scroll to the top of a parent page from within an iFrame, but its not in the same domain. 我正在尝试从iFrame中滚动到父页面的顶部,但它不在同一域中。 It throws an "Unsafe JavaScript Attempt" when I try to do it with JavaScript. 当我尝试使用JavaScript时,它将引发“不安全的JavaScript尝试”。 Is there a workaround? 有解决方法吗?

The solution will be found using the easyxdm libraries from http://easyxdm.net/wp/ to send the instruction to the parent. 可使用http://easyxdm.net/wp/中的easyxdm库找到该解决方案,以将指令发送给父级。

Sorry I don't have the exact code. 抱歉,我没有确切的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM