Answers for "change element tag javascript"

6

javascript change element id

var element = document.getElementById("oldID");
element.id = "newID";
Posted by: Guest on June-02-2020
0

how to change html element in javascript

document.getElementbyid.innerHTML = "text";
Posted by: Guest on February-10-2021
-1

javascript set header text

var headingDiv       = document.getElementById("head");
headingDiv.innerHTML = "<H3>Public Offers</H3>";

//Or with jQuery
$(".head h3").html("your new header");
Posted by: Guest on August-16-2020

Code answers related to "change element tag javascript"

Browse Popular Code Answers by Language