Javascript tutorial addEventListener Best HTML Event Handling W3C Recommended Method

  Рет қаралды 69,637

Adam Khoury

Adam Khoury

Күн бұрын

Пікірлер: 59
@ga7853
@ga7853 6 жыл бұрын
Adam, you are great, no one has bother to show old ways and new ways the way you do, thanks a million for a fully explained subject.
@StuartKaufman
@StuartKaufman 9 жыл бұрын
Here's a Fantastic Javascript EventListener Tutorial. Thanks Adam Khoury!!
@tonywilliams2164
@tonywilliams2164 6 жыл бұрын
The "Down-2-Earth Guru"!! Appreciate the heads up Adam!
@SonaSwing
@SonaSwing 10 жыл бұрын
Very useful, I am just learning so don't even know the old way but your video makes very much sense. Thank you!
@nc840
@nc840 3 жыл бұрын
you are awesome. my professor recommend your video
@McGavel1
@McGavel1 9 жыл бұрын
Cool stuff and thanks for showing browser backward compatibility!
@cink09
@cink09 11 жыл бұрын
i love the way you explain the whole process, very helpful, found my answer thanks to you.
@ladyd7778
@ladyd7778 6 жыл бұрын
Love this tutorial. Simple and easy to follow. Thank you so much!
@carmenxena
@carmenxena 10 жыл бұрын
Really explains this stuff clearly. Nice!!!
@iggymach
@iggymach 9 жыл бұрын
Awesome, this will release my HTML code from some unnecessary weight :-)
@McGavel1
@McGavel1 9 жыл бұрын
I love how we can just use the *this* keyword to access a object's methods and properties
@hercules1943
@hercules1943 12 жыл бұрын
very thanks! i very like your tutorial! thanks again.
@moodkilt2665
@moodkilt2665 11 жыл бұрын
hmm..actually i rather use the old way. In wich way is it not good to have the callings withing the body tags...Is it only because it can get messy for you to find where you are in the document or will the page run into more errors or something like that?
@donfeto7636
@donfeto7636 6 жыл бұрын
Good Job Man You Are The Best
@alvincruz8296
@alvincruz8296 6 жыл бұрын
This video is very instructive and easy to follow. But its 2018 already, I am thinking if the methods as shown here are still the best as of now.
@General_Aladeen
@General_Aladeen 6 жыл бұрын
yup, still they are.
@iamreg1965
@iamreg1965 5 жыл бұрын
No basically. The event model has always supported capturing, target and bubbling phases. The eventerlistener interface implements one method - eventHandler. One can utilise event delegation controlled by objects implementing the eventlistener interface. It makes it a breeze to dynamically add and remove both elements and events. Google event delegation and eventHandler for further details.
@iamreg1965
@iamreg1965 5 жыл бұрын
Google event delegation and eventHandler for much easier ways of controlling DOM events.
@rupalitanna6046
@rupalitanna6046 9 жыл бұрын
very nice tutorial thanks
@harkcitizens5299
@harkcitizens5299 9 жыл бұрын
Thank you very much for this tutorial. Iam french
@jaepark75
@jaepark75 9 жыл бұрын
What text editor are you using?
@24kKarl
@24kKarl 10 жыл бұрын
Is there a simple way to do this for say hundreds of checkboxes? When the box is checked, I want the value for that checkbox to be added to a list. Ty for the video Adam.
@dragonore2009
@dragonore2009 11 жыл бұрын
At the school I attend they teach the old DOM methods and still use the dreaded document.write() all the time. I am constantly finding more innovative ways to write my javaScript instead of the crap they teach at school.
@magnusoliver6086
@magnusoliver6086 3 жыл бұрын
I know I am pretty randomly asking but do anybody know of a good place to stream new movies online?
@kabircameron1818
@kabircameron1818 3 жыл бұрын
@Magnus Oliver Lately I have been using Flixzone. You can find it on google :)
@marcoalvaro627
@marcoalvaro627 3 жыл бұрын
@Kabir Cameron Definitely, I have been watching on FlixZone for since march myself :D
@magnusoliver6086
@magnusoliver6086 3 жыл бұрын
@Kabir Cameron thanks, I signed up and it seems like they got a lot of movies there :D I really appreciate it!!
@kabircameron1818
@kabircameron1818 3 жыл бұрын
@Magnus Oliver happy to help =)
@justakidify
@justakidify 11 жыл бұрын
How is it possible for btn1Func to be called on line 7 before it was defined (line 13)?
@clipoff
@clipoff 9 жыл бұрын
what does the usecaptuer true do? exactly what is captured?
@ath6192
@ath6192 4 жыл бұрын
Great! Q: Do you have a tutorial for adding the addEventListeners and buttons through an array? :)
@TakanashiYuuji
@TakanashiYuuji 11 жыл бұрын
Because of variable 'hoisting'. Function definitions get moved to the top.
@kamaboko1
@kamaboko1 11 жыл бұрын
Great tut! Thanks.
@dubbertrouble
@dubbertrouble 11 жыл бұрын
Really helpful!
@muhammadkarolia2722
@muhammadkarolia2722 7 жыл бұрын
what app did you use
@hdjksa52
@hdjksa52 10 жыл бұрын
Heavy north east accent. thanks for showing the code
@SandeepKumar-cx3kw
@SandeepKumar-cx3kw 8 жыл бұрын
thanks,, great help
@Bhuyakasha
@Bhuyakasha 11 жыл бұрын
It works pretty well, but when i try to add arguments to the function it will always execute the function, without me clicking on the object.
@mayue5547
@mayue5547 9 жыл бұрын
why window.onload = addListeners? does this line overwrite the window.onload method?
@AdamSalma
@AdamSalma 9 жыл бұрын
+Ma Yue Its so that the function only runs after the entire html document has been loaded, otherwise it can bring up errors later on. eg with document.getElementById('myId'): the html element with the id "myId" isn't loaded and so can't be selected in JS
@TheRandomDestruction
@TheRandomDestruction 11 жыл бұрын
Thanks 256!
@andrewrico8321
@andrewrico8321 5 жыл бұрын
are you still on the road?
@valix85
@valix85 9 жыл бұрын
How can i register My personal event And fires it? Congratulations forse yours video, i follow You, simply And Clean, perfect for My worst English :)
@MiddleEasternInAmerica
@MiddleEasternInAmerica 12 жыл бұрын
thanks million
@marclaren6193
@marclaren6193 5 жыл бұрын
WHAT DOES "WINDOW" STAND FOR ??
@AdamKhoury
@AdamKhoury 5 жыл бұрын
The JavaScript "window" object.
@js312
@js312 5 жыл бұрын
Is it still the right way to do it in 2019?
@AdamKhoury
@AdamKhoury 5 жыл бұрын
Yes I think so. Anonymous functions can be replaced by arrow functions, if you so desire... that is the only change since this video. But it is not necessary to change all of your anonymous functions to arrow functions.
@js312
@js312 5 жыл бұрын
Do you guys still care about people using ie 8-9 ? @@AdamKhoury , thanks. Also should you really bother writing if else inside addListeners function ? If the users use way out of date technology it should be theirs problem and they should update isin't it ?
@ionicafardefrica
@ionicafardefrica 7 жыл бұрын
As someone accustomed to back end, Java Script/jQuery has always been a pain in the ass. You ALWAYS need a mock up front to demonstrate your work, and most of the time, it needs to be pretty good. Not only you need to know something you consider outside your domain (and kind of boring/trivial and non intuitive), but also something that doesn't have a standard and works on all kinds of spaghetti for four types of browsers. And now it evolves. What the fuck people, can we get standards? Any day now? For example, can we agree if left click event is 0 or 1???
@das_evoli
@das_evoli 9 жыл бұрын
But why false or true?
@damionreid3164
@damionreid3164 8 жыл бұрын
This is not the best way to do this. Given that for every "document.getElemen...." you have to add it both in the addEventListener as well as the attachEvent block. Create a function and pass the object, event and handler to it. then depending on whether the attachEvent exists, it either attach the event or adds the event listener
@benja303
@benja303 10 жыл бұрын
YELLOWTEXTTOOOBRIGHT
@codeacademybd
@codeacademybd 8 жыл бұрын
too much zoom and zoom :(
@marclaren6193
@marclaren6193 5 жыл бұрын
THIS VIDEO IS SOOOOO CONFUSING !!!!
@AdamKhoury
@AdamKhoury 5 жыл бұрын
I'll try to help clarify anything you find confusing. This exercise just shows how to apply event handling through script instead of adding event handling to your html elements directly in the HTML code.
JavaScript Tutorial - Trigger CSS3 Transitions Control Animations
20:01
Event Listeners - Javascript - Tutorial 14
13:55
Giraffe Academy
Рет қаралды 65 М.
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2,2 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 112 МЛН
Event Handlers vs Event Listeners in JavaScript 👨‍💻💯
4:58
HTML, CSS, and Javascript in 30 minutes
31:49
devdojo
Рет қаралды 607 М.
HTMX for Impatient Devs
8:33
Isaac Harris-Holt
Рет қаралды 60 М.
Multiphase Form Programming Tutorial Multi Step JavaScript PHP
20:47
JS Touch Events on Mobile Devices
9:44
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 72 М.
💥ФЕЙГІН повернувся із СУДЖИ і шокував заявою
36:27
Телеканал Прямий
Рет қаралды 231 М.
JavaScript Fundamentals: The Capture Feature of addEventListener()
8:49
All Things JavaScript, LLC
Рет қаралды 3,5 М.
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2,2 МЛН