<html>
<body>
<h1>HTML DOM Attributes</h1>
<h2>The value Property</h2>
<p>Click to change the src attribute of the image:</p>
<button onclick="myFunction()">Click</button>
<img id="light" src="pic_bulboff.gif" width="100" height="180">
<script>
function myFunction() {
const element = document.getElementById("light");
element.getAttributeNode("src").value = "pic_bulbon.gif";
}
</script>
</body>
</html>