x
. It contains a strong
and an em.This page tests a few basic HTML DOM properties.
alert(x.innerHTML)
x.innerHTML = "Let's <u>change</u> it!"
alert(x.innerText)
x.innerText = "Let's change it!"
x.innerText = "Let's <u>change</u> it!"
After changing the outerHTML, the alert should show <div id="test">
alert(x.outerHTML)
x.outerHTML = "Let's <u>change</u> it!"
alert(x.outerText)
x.outerText = "Let's change it!"
x.outerText = "Let's <u>change</u> it!"
alert(x.textContent)
x.textContent = "Let's change it!"
x.textContent = "Let's <u>change</u> it!"