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 using iframeElement.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.
可以的。
AngularJs之类的MVVM框架就是这么玩儿的。模版通过ajax请求过来,js渲染到DOM里。
Not sure what you mean. If "预留窗口" is referring to a
<iframe>
:Updating DOM in an
<iframe>
is possible, you can acquire thedocument
object of the frame usingiframeElement.contentDocument || iframeElement.contentWindow.document
, then modify it. You can also call functions defined inside<iframe>
usingiframeElement.contentWindow
directly.Notice you'll need to follow same-origin policy in order to do so.