'innerText' Example : innerText « Javascript Properties « JavaScript Reference
- JavaScript Reference
- Javascript Properties
- innerText
'innerText' Example
<html>
<body>
<p id="myP">Sample Text inside a <b>p</b> element</p>
<button onclick="alert(myP.innerHTML);">InnerHTML</button>
<button onclick="alert(myP.innerText);">InnerText</button>
</body>
</html>
Related examples in the same category