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.
我试过这个来获得父屏幕位置,但它给了我 0。
window.parent.$(document).scrollTop()
你必须像这样尝试
$(window.parent.document).scrollTop();
或者
window.parent.$(window.parent.document).scrollTop(); // if jQuery not included in child frame