Dynamically Resizing an Iframe

前端 未结 3 1835
闹比i
闹比i 2021-01-03 07:54

I can see that this question has been asked several times, but none of the proposed solutions seem to work for the site I am building, so I am reopening the thread. I am at

3条回答
  •  臣服心动
    2021-01-03 08:36

    DynamicDrive has such a script, which I think does what you're asking for.

    There's also a newer version now.


    2011 update:

    I would strongly recommend using AJAX over something like this, especially considering that a dynamically resizing iframe only works across the same domain.

    Even so, it's a bit iffy, so if you absolutely must use AJAX over standard page loading, you really, really should use things like history.pushState (and have standard page loading as a fallback for browsers that don't support it). There's a jQuery plugin which handles this stuff for you, written by a GitHubber, called pjax, which they use only for repo navigation.

提交回复
热议问题