课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
DOM events explained
- This headlamp has hidden features. In addition to just turning it on and off with the button, I can also change the brightness of the light by turning it on and then holding down the button. I can also change the type of light emitted if I rapid click the button. And when I click the button, it indicates how much battery is left on it. This is all possible thanks to event handling. Anytime a defined event happens, like the button being pressed and released, the program inside the flashlight detects that event, identifies what type of event it was and fires the corresponding program. So pressing and releasing the button is one event. It turns the light on and off. Another event is pressing and holding the button. It triggers the brightness level to change. Yet another event is pressing and releasing rapidly. It triggers mode changes. When we interact with computer software, we are literally firing events that are then…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
-
-
-
-
-
(已锁定)
DOM events explained1 分钟 41 秒
-
(已锁定)
Typical DOM events5 分钟 35 秒
-
(已锁定)
Event listeners5 分钟 45 秒
-
(已锁定)
Practice: Experiment with event listeners1 分钟 32 秒
-
(已锁定)
Advanced event listeners and "this"6 分钟 12 秒
-
(已锁定)
Pass arguments through event listeners4 分钟 53 秒
-
(已锁定)
Challenge intro: Create an event listener2 分钟 15 秒
-
(已锁定)
Solution: Create an event listener6 分钟 16 秒
-
(已锁定)
-
-