Set outer Text (Firefox does not support the innerText property.) : outerText « DOM Node « JavaScript Tutorial






<html>
<head>
<title>OuterText Example</title>
<script type="text/javascript">
function useOuterText() {
    var oDiv = document.getElementById("div1");
        oDiv.outerText = "This is some new text not inside a DIV.";
    }
</script>
</head>
<body>
<div id="div1">This is my original DIV</div>
<input type="button" value="Use OuterText" onclick="useOuterText()" />
</body>
</html>








23.17.outerText
23.17.1.Set outer Text (Firefox does not support the innerText property.)
23.17.2.Get outerText value for a tag (Firefox does not support the outerText.)