Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var X = document.getElementById("intro");
- var x = document.getElementsByTagName("p");
- var x = document.getElementsByClassName("intro");
- var x = document.querySelectorAll("p.intro");
- element.innerHTML = new html content // Exam:- object.innerHTML/.innerText/.textContent = "<p>Dog</p>";
- element.attribute = new value // Exam:- object.src = "landscape.jpg";
- element.style.property=newstyle // Exam:- object.style.color="blue";
- element.setAttribute(attribute, value) // Exam:- object.setAttribute("style", "background-color: red;");
- element.removeAttribute(attributename) // Exam:- object.removeAttribute("href");
Add Comment
Please, Sign In to add comment