Answers for "how to replace div element with another in javascript"

0

how to replace div element with another in javascript

window.onload = function() {
  document.getElementByClass("to_be_replaced").innerHTML = document.getElementByClass("replaced").innerHTML;
}
Posted by: Guest on March-17-2022
0

how to replace div element with another in javascript

<div class="to_be_replaced">
  Lorem ipsum...
</div>
<div class="replaced">
  test
</div>
 Run code snippetHide results
Posted by: Guest on March-17-2022
0

how to replace div element with another in javascript

window.onload = function() {
  document.getElementById("to_be_replaced").innerHTML = "<span> gdfg </span>";
}
Posted by: Guest on March-17-2022

Code answers related to "how to replace div element with another in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language