开发者

scrollbar iframe in javascript

I would like to add a scrollbar when the contents of the iframe is too large and does not appear.

I am trying the following:

parent.iframepage.style.height = "350px"; parent.iframepage.style.width = "500px"; parent.iframepage.contentarea.style.height = "350px"; parent.iframepage.contentarea.style.width = "500px"; parent.iframepage.contentarea.s开发者_Python百科tyle.overflow = "visible";

any help please?


Surely the correct syntax would be ...

parent.iframepage.style.overflow = "auto";

I'd recommend doing it in the stylesheet.

iframe
{
    overflow: auto;
}

You should qualify it better, with an ID, class or such.


You can modify the content of the iframe only if it is from the same domain as the parent document.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜