课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Solution: Create an event listener
(upbeat instrumental music) - [Instructor] There are several ways of solving this challenge, and if you couldn't make it work with any of the ways you tried that is perfectly okay because this particular challenge is much more advanced and much more complex than the previous ones. I'll show you why before I show you the solution. We're working with a series of forms here, and when the user interacts with any of these forms we need to not only detect which button was clicked but which input field is associated with that button and which external paragraph with a span inside it is associated with that button so that the value that's put in the input field gets passed up into the span with the class value for the associated paragraph. That is not straightforward. The reason I've created this challenge is because this is a fairly common problem you'll encounter on the web, and understanding the logic of how to solve this kind…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
-
-
-
-
-
(已锁定)
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 秒
-
(已锁定)
-
-