crop_rotate
Run
<!DOCTYPE html> <html> <body> <h1>HTML DOM insertAdjacentElement() Method</h1> <p>This method inserts a specified element, into a specified position.</p> <h2 id="myH2">My Header</h2> <span style="color:red">My span</span> <p>Click the button to insert the red span before the header:</p> <button onclick="myFunction()">Move span</button> <script> function myFunction() { var s = document.getElementsByTagName("span")[0]; var h = document.getElementById("myH2"); h.insertAdjacentElement("beforebegin", s); } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8aDE+SFRNTCBET00gaW5zZXJ0QWRqYWNlbnRFbGVtZW50KCkgTWV0aG9kPC9oMT4NCg0KPHA+VGhpcyBtZXRob2QgaW5zZXJ0cyBhIHNwZWNpZmllZCBlbGVtZW50LCBpbnRvIGEgc3BlY2lmaWVkIHBvc2l0aW9uLjwvcD4NCg0KPGgyIGlkPSJteUgyIj5NeSBIZWFkZXI8L2gyPg0KDQo8c3BhbiBzdHlsZT0iY29sb3I6cmVkIj5NeSBzcGFuPC9zcGFuPg0KDQo8cD5DbGljayB0aGUgYnV0dG9uIHRvIGluc2VydCB0aGUgcmVkIHNwYW4gYmVmb3JlIHRoZSBoZWFkZXI6PC9wPg0KDQo8YnV0dG9uIG9uY2xpY2s9Im15RnVuY3Rpb24oKSI+TW92ZSBzcGFuPC9idXR0b24+DQoNCjxzY3JpcHQ+DQpmdW5jdGlvbiBteUZ1bmN0aW9uKCkgew0KICB2YXIgcyA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJzcGFuIilbMF07DQogIHZhciBoID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoIm15SDIiKTsNCiAgaC5pbnNlcnRBZGphY2VudEVsZW1lbnQoImJlZm9yZWJlZ2luIiwgcyk7DQp9DQo8L3NjcmlwdD4NCg0KPC9ib2R5Pg0KPC9odG1sPg==