<html>
<title>colour change </title>
<body>
<h2>What Can JavaScript Do?</h2>
<p id="demo">JavaScript can change HTML content.</p>
<button onclick="document.getElementById('myimage').src='C:/Users/abc/Documents/js/image/pic_bulboff.gif'">trun off</button>
<img id="myimage" src='C:/Users/abc/Documents/js/image/pic_bulboff.gif' style="width:200px">
<button onclick="document.getElementById('myimage').src='C:/Users/abc/Documents/js/image/pic_bulbon.gif'">trun on</button>
</body>
</html>
<title>colour change </title>
<body>
<h2>What Can JavaScript Do?</h2>
<p id="demo">JavaScript can change HTML content.</p>
<button onclick="document.getElementById('myimage').src='C:/Users/abc/Documents/js/image/pic_bulboff.gif'">trun off</button>
<img id="myimage" src='C:/Users/abc/Documents/js/image/pic_bulboff.gif' style="width:200px">
<button onclick="document.getElementById('myimage').src='C:/Users/abc/Documents/js/image/pic_bulbon.gif'">trun on</button>
</body>
</html>
No comments:
Post a Comment