Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我进入了一个 iframe,我想滚动(当我单击 iframe 内的链接时)顶部的整个浏览器窗口。我可以这样做吗?
我控制页面容器和 iframe。
var contents = $('iframe').contents(), element = contents.find('#click'); element.click(function() { $('html, body').animate({ scrollTop: 0 }, 500); });