【问题标题】:ScrollTo or ScrollLeft. Div inside of IframeScrollTo 或 ScrollLeft。 Iframe 内的 Div
【发布时间】:2013-05-21 20:44:25
【问题描述】:

我试图在加载到 iframe 中的 html 页面上创建一个 div,并滚动到某个水平位置 onload。但我无法让它工作。 在 html 页面中使用一些简单的 body onload 代码,我让 div 滚动到某个点。但是当加载到 iframe 中时,它就不会再发生了。

这是我现在在我的 iframe 中的代码,但它并没有做太多..

<iframe id='idframe' style='width:23300px; height: 650px; border:none; overflow: hidden;' src='http://www.foundfootage.be/kijk3.html'

onload="this.contentWindow.getElementById("images_hz").scrollLeft=100"

非常感谢任何帮助

【问题讨论】:

    标签: html iframe scrollto indexhibit


    【解决方案1】:

    我不确定...但我的猜测是 javascript 代码需要在 iframe 中...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-20
      • 1970-01-01
      • 2012-08-13
      • 2023-03-23
      相关资源
      最近更新 更多