How to prevent an iframe from reloading when moving it in the DOM

后端 未结 4 1700
北海茫月
北海茫月 2020-12-03 04:55

I have an iframe loaded with some content. I would like to move it inside the DOM without causing a refresh (I like the content inside it, I want to keep it).

I\'m d

4条回答
  •  渐次进展
    2020-12-03 05:13

    I don't think so, as the browser is going to re-render/reload the iframe when it's put back in the DOM.

    http://polisick.com/moveNode.php better explains it.

    To move a node you call removeNode to take it out of the tree and into memory, then appendNode to 'paste' it back where you want it.

提交回复
热议问题