Maison > Questions et réponses > le corps du texte
当我点击左边的侧栏的时候,我能在预留窗口中看到无刷新的页面显示,用js可以实现不。
黄舟2017-04-10 14:47:40
Not sure what you mean. If "预留窗口" is referring to a <iframe>
:
Updating DOM in an <iframe>
is possible, you can acquire the document
object of the frame usingiframeElement.contentDocument || iframeElement.contentWindow.document
, then modify it. You can also call functions defined inside <iframe>
using iframeElement.contentWindow
directly.
Notice you'll need to follow same-origin policy in order to do so.