Dynamically change the properties of iframe

xiaoxiao2021-03-06  61

Using the properties of the Window object, the iframe obtained by Window.frames.MainFrame can only control the objects of its internal pages, as follows: (MainTable is a Table object) Window.frames.MAINFrame.Document.all.mainTable. ClientHeight If you want to dynamically change the properties of the iframe, use Document.frames.MainFrame to get iframe with Document.frames.MainFrame. As follows: (To dynamically change the ife of the iferame's Height property specified in the IFrame's SRC property, you can write the following code in the SRC property specified by the page) WINDOW.PARENT.Document.All.mainframe.Height = Document. all.mainTable.clientHeight; msdn original words in these two should also be noted: Security Alert To protect user privacy and safeguard your applications, Internet Explorer restricts some interactions between frames that host Web pages from different domains For more information about using the. Dynamic HTML (DHTML) object model with the frame and iframe objects, see About Cross-Frame Scripting and Security and Security Considerations:. Dynamic HTML Note Properties of the iframe must be accessed using the prefix, document.all, for example, document. All.iframeid.marginwidth.

转载请注明原文地址:https://www.9cbs.com/read-113972.html

New Post(0)