About 2,450,000 results
Open links in new tab
  1. Turn on or off bulb using JavaScript - GeeksforGeeks

    Jan 3, 2024 · In this article, we are going to learn how to turn on or off bulbs using JavaScript. Syntax <img src = "URl" onClick=turnOnOff()> Approach. The HTML file includes the necessary structure with a <script> tag for JavaScript code, a <img> tag for the bulb image, and a <p> tag for a descriptive message.

  2. W3Schools Tryit Editor

    The W3Schools Tryit Editor lets you experiment with JavaScript code and instantly see the results in your browser.

  3. Bulb On Off | Spaceship - Road To Code

    function bulbOn() { bulbElement.src = "on.png"; }: This is a JavaScript function named bulbOn(). When called, it changes the src attribute of the bulbElement to on.png, effectively changing the displayed image to an illuminated bulb.

  4. KrishPatel-AI/Bulb-On-Off - GitHub

    This repository contains a small project demonstrating how to toggle a bulb on and off using JavaScript, HTML, and CSS. It includes a bulb image for visual feedback. Perfect for beginners to practice basic DOM manipulation and event handling.

  5. JavaScript Bulb On/Off Image Download - A Simple yet Effective …

    Creating a JavaScript bulb on/off image download is relatively simple, requiring only basic knowledge of HTML, CSS, and JavaScript. Here's a step-by-step guide to get you started: Create an HTML Structure: Start by creating the basic structure for your bulb on/off effect using HTML.

  6. Bulb On / Off using JavaScript - Full Stack Gyan

    Nov 3, 2023 · Hello friends, in today’s post you will know how to turn the bulb on and off (bulb on and off using js) with JavaScript, so let’s start. The path of whose image is being given to you below. Now you will need some CSS to center the entire image and change the background color of the body, the CSS code of which is given below.

  7. Bulb On/Off Effect using JavaScript - Youths Forum

    Feb 15, 2021 · In this tutorial, we will be using JavaScript to create a bulb on/off effect in a webpage. The following source code uses two identical bulb images one in on.

  8. Bulb Toggle (ON/OFF) Project - GitHub

    This project demonstrates a simple interactive "bulb on/off" effect using HTML, CSS, and JavaScript. The interface includes two buttons to switch the bulb's image between "on" and "off" states, making it a great beginner project to practice JavaScript DOM manipulation and responsive design.

  9. Mastering JavaScript: A Simple Bulb On-Off Demo

    Mar 12, 2025 · In this post, we'll explore a simple yet effective example of using JavaScript to create a bulb on/off effect. We'll cover the basics of event listeners and DOM manipulation, so let's dive in! The HTML Structure. First, let's set up our HTML structure: width: 50px; height: 20px; border-radius: 10px; background-color: #ccc;

  10. Bulb On Off JavaScript- Mini Project [ Free Source Code ]

    Aug 23, 2019 · To turn the bulb on or off, first, we need to create an HTML page with CSS (CSS is only for the buttons and images) and apply the javascript code to change the bulb images. We have two images bulb on and bulb off, initially, we are keeping the bulb status off.

  11. Some results have been removed
Refresh