'namedItem()' Example : namedItem « Node Operation « JavaScript DHTML






'namedItem()' Example

    
<html>
<body>
<script language="JavaScript">
function function1() {
    document.all.namedItem("myDiv1").innerText = "Named Item"; 
} 
</script>
<div id="myDiv1" style="width:600; height:200; background-color:blue;">
Click button to change me
</div>
<button onclick="function1();">Named item</button>
</body>
</html>

    
      
      








Related examples in the same category