<html>
<body>
<h1>HTML DOM Attributes</h1>
<h2>The getNamedItem() Method </h2>
<img id="light" src="pic_bulbon.gif" width="100" height="180">
<p>The value of the scr attribute is:</p>
<p id="demo"></p>
<script>
const nodeMap = document.getElementById("light").attributes;
let value = nodeMap.getNamedItem("src").value;
document.getElementById("demo").innerHTML = value;
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_namednodemap_getnameditem1 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:39:46 GMT -->
</html>