English 中文(简体)
Iframe autoize
原标题:Iframe autoresize

I am designing a web page with HTML IFrames is there a possible way to make the Iframe width and height autoresize and is that compatable with at least (IE,firefox,safari,chrom) ??

请帮助!

问题回答

页: 1

你们可以方便地管理血缘,但网页是流传文件,并不“理解”高度概念(至少不容易)。

为了做到这一点,你不得不使用javascript。 为了使你的javascript cross-browser尽可能方便地兼容,你应当使用一个框架,例如。 Query

这里有几个问题涉及利用j Query将内容转至高端的问题:,如

在舱面上载荷时,机体是指确定高端的机体。



    <iframe name="preview" id="preview" width="450" height="450"    onLoad="iframeResize();"></iframe>

    <script>
        function iframeResize () {
            document.getElementById( preview ).height = SOMEVALUE
            document.getElementById( preview ).width = SOMEVALUE
        }  
    </script>





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签