首页 > 解决方案 > 从框架滚动到顶部

问题描述

在 iframe 中打开页面时,我需要将主浏览器窗口滚动到顶部。我试试

$(document).ready(function() {
    $("body,html", window.parent).animate({scrollTop:0}, 'slow');
});

但它不起作用。有什么错误?

标签: iframescrolltop

解决方案


推荐阅读