Event Handlers vs Event Listeners in JavaScript 👨‍💻💯

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 2024

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

  • @rocdiva530
    @rocdiva530 9 หลายเดือนก่อน +5

    I’m new to JavaScript and I kept hearing my teacher talk about event handler, event listener and I couldn’t decipher one from the other. This video is just what I needed. THANK YOU!

  • @Ifeomaa
    @Ifeomaa 10 หลายเดือนก่อน +4

    Short and straight to the point, learnt helpful tips

  • @Jaycoda10
    @Jaycoda10 2 ปีที่แล้ว +9

    brilliant just what I was looking for, simple and straight to the point, boom!

  • @kaanergunlu7836
    @kaanergunlu7836 2 ปีที่แล้ว +4

    Well explained with clear examples, appreciated!

  • @sahanatelasng8812
    @sahanatelasng8812 2 ปีที่แล้ว +1

    Really this video gave me a solution for my problem .... U are the best ... U solved it within few seconds .... In easy way..

  • @edwinlimo5354
    @edwinlimo5354 2 ปีที่แล้ว +1

    Great Patrick, your explanations are easy to understand

  • @therealspaceman3447
    @therealspaceman3447 ปีที่แล้ว +1

    This was a very useful video for me. I had previously wrapped button and such with divs to support two events at once. No more. Thank you.

  • @darrienjohnson9053
    @darrienjohnson9053 2 ปีที่แล้ว +7

    Thanks. This was simple and easy to understand appreciate it bro

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

    very precise and straight to the point. auto sub

  • @bigshuff
    @bigshuff ปีที่แล้ว +1

    Thank you for making this subject so easy to understand, I am so glad I persevered with my search and found you.

  • @essenzoffiziell8421
    @essenzoffiziell8421 ปีที่แล้ว

    thank you for your video... God Bless You with The Best All Things

  • @Prabh_cc
    @Prabh_cc ปีที่แล้ว

    Helpful content❤❤❤, I'm glad that you are doing something useful😊

  • @hajimeippo804
    @hajimeippo804 3 ปีที่แล้ว +1

    thank you ..this is the best explanation about difference between handler and listener. .I was confused about them very much. ....Subscribed 👍

  • @aamir067
    @aamir067 ปีที่แล้ว

    thanks buddy. you really solved my confusion about event handler and listener.

  • @Zen-lz1hc
    @Zen-lz1hc 2 ปีที่แล้ว +1

    Like
    Thanks for the clear explication.

  • @sunyfilip
    @sunyfilip ปีที่แล้ว +6

    But you need to be careful if you are assigning those listeners dynamically....if you for example open dialog with that element again and you are assigning those listeners again, you will have all your listeners runned multiple times, so don't forget to remove listeners before taking your element away :)

  • @bluin666
    @bluin666 2 ปีที่แล้ว

    thx. that was pretty easy to understand

  • @marky1756
    @marky1756 2 ปีที่แล้ว +1

    Now I understand. Thanks a lot.👍

  • @reithmkil1168
    @reithmkil1168 ปีที่แล้ว

    Bro thank you for this video, perfect explanation

  • @djfago6240
    @djfago6240 ปีที่แล้ว

    Brilliant explanation. Thank you bro

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

    Thanks for explaining ❤

  • @sip6963
    @sip6963 2 ปีที่แล้ว

    Great video! Solved my doubt of 2hrs research. Kudos!

  • @blueberry5992
    @blueberry5992 ปีที่แล้ว

    keep up the great work

  • @yuriinadilnyi3029
    @yuriinadilnyi3029 ปีที่แล้ว +1

    I'd like to add that using EventListener allows you to add additional options if it's needed, cuz Im not sure if handlers do the same staff

  • @passionatechristianmaker
    @passionatechristianmaker ปีที่แล้ว

    Great video, at work i hear these terms all the time but didn't get them initially

  • @GLHD-tl2hl
    @GLHD-tl2hl 7 หลายเดือนก่อน +1

    mind asking what font is this??... Too cool

  • @ScottIngram
    @ScottIngram ปีที่แล้ว

    Thank you. Very clear.

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

    Nice job.

  • @philipparker113
    @philipparker113 ปีที่แล้ว

    Thanks. Its very clear now.

  • @محمّد.09
    @محمّد.09 9 หลายเดือนก่อน

    why no one is appreciating his typing sound?

  • @JoanManuelSB
    @JoanManuelSB ปีที่แล้ว

    nice

  • @offgridvince
    @offgridvince ปีที่แล้ว +1

    Thanks

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

    thank you bro

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

    How do you click once & comment 3 different lines at the same time? I'm also just learning a lot of shortcuts in the IDE

  • @user-ig1tf5bx2e
    @user-ig1tf5bx2e 2 ปีที่แล้ว +1

    Thank you

  • @chigurupati_s
    @chigurupati_s ปีที่แล้ว

    Super bro

  • @japhethachimba174
    @japhethachimba174 2 ปีที่แล้ว

    Thanks for the awesome content, which theme are you using for your VSCODE bro

  • @hajimeippo804
    @hajimeippo804 3 ปีที่แล้ว

    can you please make video about difference between let,const and various and when to use them?

  • @AnilKumar-jx1hk
    @AnilKumar-jx1hk ปีที่แล้ว

    nice moustache btw

  • @anarosol6133
    @anarosol6133 ปีที่แล้ว

    Thank you!!

  • @Escko
    @Escko ปีที่แล้ว

    thank you

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

    🎯 Key Takeaways for quick navigation:
    00:00 *🎶 Introduction to Event Handling in JavaScript*
    - Understanding the difference between event handlers and event listeners in JavaScript.
    - Overview of handling events using event handlers and event listeners.
    00:30 *🖱️ Event Handlers in JavaScript*
    - Event handlers are properties of objects used to handle events.
    - Demonstrating event handling with an example of using the `onclick` event handler.
    - Limitation of event handlers: only one event handler for a specific event type.
    01:51 *🔊 Event Listeners in JavaScript*
    - Event listeners are assigned to objects to listen for events and execute code accordingly.
    - Example of using the `addEventListener` method to handle click events.
    - Advantage of event listeners: ability to add multiple listeners for the same event.
    03:41 *🔃 Comparison: Event Handlers vs. Event Listeners*
    - Experimenting with adding multiple event handlers and event listeners to understand their behavior.
    - Demonstration of the difference in behavior when adding multiple handlers/listeners.
    - General advice: prefer event listeners over event handlers for flexibility and scalability.
    Made with HARPA AI

  • @yousef7885
    @yousef7885 2 ปีที่แล้ว

    thank you very much

  • @jackmandu
    @jackmandu 2 ปีที่แล้ว +2

    Is there a preference of which to use if you need to have multiple objects all call the same function? For example I need to have several form fields concatenated into a single field.
    Also, is there anything special that needs to be done with addEventListener depending on the type of input field, such as radio button vs. text vs. select field?

    • @jackmandu
      @jackmandu ปีที่แล้ว

      The solution I used was to use the generally least preferred option, which is in-line HTML event handler where you can have multiple functions separated by semi-colons, such as onchange=“func1();func2()”.

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

    What if I use handler and listener at the same time?

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

    believe or not my teacher has no idea about Event Handlers

  • @mahtabvariyani
    @mahtabvariyani ปีที่แล้ว

    thanks

  • @jarawinpromsawat
    @jarawinpromsawat 3 ปีที่แล้ว

    เทพจัดพี่

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

    I love you

  • @shivinNirwanYadav
    @shivinNirwanYadav ปีที่แล้ว

    Impress why code typing

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

    +

  • @capslock3250
    @capslock3250 ปีที่แล้ว

    Thanks

  • @Anas-ri4vv
    @Anas-ri4vv ปีที่แล้ว

    Thank you