Starter Tutorials

A tutorial site for beginners!

Starter tutorials contains well written tutorials on various technologies. Simple examples have been provided through out the tutorials to help the beginners understand them in a easy way.

Go to Blog »

Problem Statement


Create a web page which displays a light bulb image. Below the image display two buttons ON and OFF. When the user clicks ON button, the image (bulb) should glow and when the user clicks OFF button, the image (bulb) should return back to off state. (Hint: Grab two images of a light bulb, one represents ON state and the other represents OFF state. Change the images on the webpage using DHTML)


Source Code


ex9.html


ex9script.js


Output

Click here for output