Learn JavaScript MOUSE EVENTS in 10 minutes! 🖱

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ต.ค. 2024
  • #javascript #tutorial #course
    // eventListener = Listen for specific events to create interactive web pages
    // events: click, mouseover, mouseout
    // .addEventListener(event, callback);

ความคิดเห็น • 42

  • @BroCodez
    @BroCodez  10 หลายเดือนก่อน +9

    // eventListener = Listen for specific events to create interactive web pages
    // events: click, mouseover, mouseout
    // .addEventListener(event, callback);
    const myBox = document.getElementById("myBox");
    myBox.addEventListener("click", event => {
    event.target.style.backgroundColor = "tomato";
    event.target.textContent = "OUCH! 🤕";
    });
    myBox.addEventListener("mouseover", event => {
    event.target.style.backgroundColor = "yellow";
    event.target.textContent = "Don't do it 😲";
    });
    myBox.addEventListener("mouseout", event => {
    event.target.style.backgroundColor = "lightgreen";
    event.target.textContent = "Click Me 😀";
    });


    Document


    Click Me 😀


    #myBox{
    background-color: lightgreen;
    width: 300px;
    height: 300px;
    font-size: 4.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    text-align: center;
    }

    • @masternobody1896
      @masternobody1896 10 หลายเดือนก่อน +2

      yo make more video about how to get a job please

  • @high.notes1
    @high.notes1 10 หลายเดือนก่อน +33

    Bro I majorly respect you and I feel like you're working so hard to keep posting content for us. I feel like you should just be free to take a break whenever you feel like it because I know the amount of hard work you put into these videos.

    • @BroCodez
      @BroCodez  10 หลายเดือนก่อน +24

      I appreciate that! Tbh I'm mentally exhausted 😩

    • @Chilli_Tea
      @Chilli_Tea 10 หลายเดือนก่อน +16

      @@BroCodez Have a break!!! More than enough content to keep us busy for a long while

  • @leshanelim9454
    @leshanelim9454 3 หลายเดือนก่อน

    thank you so much!! this helps a lot! my web development has improved significantly ever since i found your channel, and its only going to get better! i love the way you explain and show the code! kudos to you!!

  • @KennethCox-or8bm
    @KennethCox-or8bm 3 หลายเดือนก่อน +1

    Thank you, these videos have helped me learn JavaScript. Please would you let us know which VSCode extension you're using to pull up your Emoji console... I love what you're doing Thanks Again!

  • @hellmn9490
    @hellmn9490 2 วันที่ผ่านมา

    your explanation is so good man

  • @TapasShrestha
    @TapasShrestha 9 วันที่ผ่านมา

    awesome video sir , i always learn something new from your video . btw i have a question sir
    Whats the difference between using addeventlisterner and using .onclick , .onmouseover etc , its faster to use second option and easier too , event object also works on both methods , so which one should i use

  • @nikolasknappen4110
    @nikolasknappen4110 2 หลายเดือนก่อน

    Bro Code is the Best Code! Thank you for all that you do. You are a gentleman and a scholar.

  • @pietraderdetective8953
    @pietraderdetective8953 10 หลายเดือนก่อน +1

    BroCode! lovin your videos!
    Any plan to make Zig videos? Looks to be the hype especially since people realizes Bun is made with Zig.
    cheers!

  • @tharunkumar8507
    @tharunkumar8507 8 หลายเดือนก่อน +2

    We would love your content. Thank you ❤ sir

  • @MohamedMuhumed-d8u
    @MohamedMuhumed-d8u หลายเดือนก่อน

    the only mentor that made me fall in love with code

  • @PyrdeXshorts
    @PyrdeXshorts 10 หลายเดือนก่อน +16

    Can you do this for Python also?

    • @Hnxzxvr
      @Hnxzxvr 5 หลายเดือนก่อน +1

      No I don’t thing so cause it doesn’t have a getelementbyid or getelementbyclass functions

  • @janlim9374
    @janlim9374 7 หลายเดือนก่อน

    very clear thank you

  • @abdulhamidmuktar9138
    @abdulhamidmuktar9138 5 วันที่ผ่านมา

    How to add emojis in HTML using VS CODE? Please share thar with us because it is easier than using HTML emojis by using tags

  • @camishan8465
    @camishan8465 7 หลายเดือนก่อน

    This was awesome

  • @Belumga77
    @Belumga77 หลายเดือนก่อน

    you are my real bro

  • @Snickerx
    @Snickerx 4 หลายเดือนก่อน

    Super Film!

    • @RanMC9918
      @RanMC9918 3 หลายเดือนก่อน

      most recent comment

  • @leFrederic
    @leFrederic 10 หลายเดือนก่อน +2

    Bro sorry for my stupid question, but how can I add emojis on the HTML file just like you did at 1:00?

    • @BroCodez
      @BroCodez  10 หลายเดือนก่อน +3

      Win + ;

    • @RanMC9918
      @RanMC9918 3 หลายเดือนก่อน

      @@BroCodez 🙏

  • @jiyoungkim9258
    @jiyoungkim9258 10 หลายเดือนก่อน

    this is so cute functions xD

  • @liamlienhard8693
    @liamlienhard8693 10 หลายเดือนก่อน +1

    how do you toggle between the original state and a custom state?

  • @248h9
    @248h9 10 หลายเดือนก่อน

    Can you make course for making spigot plugins?

  • @FushigiMigi
    @FushigiMigi 5 หลายเดือนก่อน

    Thanks!

  • @SHAHIDZE_GAMING
    @SHAHIDZE_GAMING 10 หลายเดือนก่อน

    This is usefull

  • @AJ_Editz002
    @AJ_Editz002 10 หลายเดือนก่อน

    Thankyou bro:)

  • @SHAHIDZE_GAMING
    @SHAHIDZE_GAMING 10 หลายเดือนก่อน

    Lucky you

  • @ahamednafees9961
    @ahamednafees9961 10 หลายเดือนก่อน

    Everyone's getting an heart can i too bro?

  • @AshwinSI-px5yo
    @AshwinSI-px5yo 4 หลายเดือนก่อน

    How did you bring the emoji box in vs code ??

    • @RanMC9918
      @RanMC9918 3 หลายเดือนก่อน +1

      windows + "."

  • @liamlienhard8693
    @liamlienhard8693 10 หลายเดือนก่อน

    btw, is the an easy way to make an undo button?

    • @BroCodez
      @BroCodez  10 หลายเดือนก่อน +2

      Ctrl + z my brother lol

  • @l213dhanesh3
    @l213dhanesh3 10 หลายเดือนก่อน

    Code bro😊

  • @sergiocondo9585
    @sergiocondo9585 3 หลายเดือนก่อน

    Muy buen video, gracias

  • @essekgeldim
    @essekgeldim 10 หลายเดือนก่อน +1

    First

  • @sergiocondo9585
    @sergiocondo9585 3 หลายเดือนก่อน

    Buen dia, como hago para que aparezca los emojis?

  • @AsianCanadianInvestor
    @AsianCanadianInvestor 6 หลายเดือนก่อน

    how did you add that emoji on the html page?

    • @jabulanipolokera7027
      @jabulanipolokera7027 6 หลายเดือนก่อน

      press windows button and full stop button combination...you get emojis