JSFiddle - React, Tailwind, and code Playground
HTML
<div id="mover" onClick="swapFrames()">move</div>
<div id="wrap1">
<iframe id="iframe1" src="http://matthart.com/1.htm"></iframe>
</div>
<div id="warp2">
<iframe id="iframe2" src="http://matthart.com/1.htm"></iframe>
</div>
CSS
#mover {
cursor:pointer;
}
JavaScript
function swapFrames() {
var w1 = document.getElementById('wrap1');
var w2 = document.getElementById('wrap2');
var f1 = document.getElementById('iframe1');
var f2 = document.getElementById('iframe2');
f1.parentNode = w2;
f2.parentNode = w1;
alert(f1.parentNode.id);
}