Updated files

This commit is contained in:
2025-11-06 17:40:08 +03:00
parent 7985e62c8e
commit 0e3d670b1c
3 changed files with 18 additions and 0 deletions

18
light.html Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<body>
<h2>What Can JavaScript Do?</h2>
<p>JavaScript can change HTML attribute values.</p>
<p>In this case JavaScript changes the value of the src (source) attribute of an image.</p>
<button onclick="document.getElementById('myImage').src='pic_bulbon.gif'">Turn on the light</button>
<img id="myImage" src="pic_bulboff.gif" style="width:100px">
<button onclick="document.getElementById('myImage').src='pic_bulboff.gif'">Turn off the light</button>
</body>
</html>

BIN
pic_bulboff.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
pic_bulbon.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB