html 对象标签的滚动位置
我正在开发一个通过对象标签
I am working on a project that pulls in a pdf document via the object tag <object data="the-url-to-the-document" class="ppa_document" type="application/pdf"></object>
and I want to find out if the user has scrolled to the bottom of that embedded document to then enable the "i agree" checkbox. I tried it will the jQuery .scroll() function but that didn't work. Any suggestions? Considering Adobe Acrobat is a totally different interface, it may not be possible. On the other hand, it does become part of the DOM, so maybe it is possible!?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于大多数 DOM 元素,您可以使用scrollTop 属性。例如:
然而,
For most DOM elements you could use the scrollTop property. For example:
However, what happens inside of the <object> tag is a different story... In case of PDF files, Acrobat Reader is handling the scroll bars and I do not believe there is an API to get the scroll bar position. However, please correct me if I am wrong, as I'd love to know myself if there is such a thing.