Lamp control v1

Apr 19th, 2021
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>Hello JS</title>
  5.         <script>
  6.            function lampOn(){
  7.                 document.getElementById("lampImg").src = "pic_bulbon.gif";
  8.            }
  9.            function lampOff(){
  10.                 document.getElementById("lampImg").src = "pic_bulboff.gif";
  11.            }
  12.         </script>
  13.     </head>
  14.     <body>
  15.         <button onclick="lampOn()"> LAMP ON </button>
  16.         <button onclick="lampOff()"> LAMP OFF </button>
  17.         <img src="pic_bulboff.gif" id="lampImg">
  18.     </body>
  19. </html>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.