Answers for "add html trough js"

1

how to insert html in javascript

var h = document.getElementById("myH2");
h.insertAdjacentHTML("afterend", "<p>My new paragraph</p>");
Posted by: Guest on July-13-2021
1

javascript add to html

<script src ="path/your js file name"></script>
Posted by: Guest on June-17-2021

Browse Popular Code Answers by Language