课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Access elements with querySelector methods - JavaScript教程
课程: JavaScript Essential Training
Access elements with querySelector methods
- [Instructor] Let's take a look at how to access elements in the DOM using JavaScript. In the exercise files for this movie, I've updated our examples so we have some actual content to work with. I've added some basic HTML and a style sheet in index.html and I've also expanded the HTML output in the template literal a little bit to make it possible to style it. I've added some classes. I've wrapped spans around the values, and I've also added an image at the top here. Looking at the project site in the browser you'll see, it looks quite different but there's nothing new here in terms of JavaScript. I've just expanded on what we've covered so far in the course. All right, anytime you want to do something in the DOM you start by finding the element or elements you want to work with. For this, we have two methods: query selector and query selector all. And they both apply to the document object. These methods use…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
-
DOM: The Document Object Model4 分钟 7 秒
-
(已锁定)
Access elements with querySelector methods6 分钟 6 秒
-
(已锁定)
Access elements using older methods3 分钟 45 秒
-
(已锁定)
Practice: Find an element1 分钟 29 秒
-
(已锁定)
Modifying element classes4 分钟 53 秒
-
(已锁定)
Attributes4 分钟 13 秒
-
(已锁定)
Inline style3 分钟 52 秒
-
(已锁定)
Practice: Modify classes and attributes, and styles1 分钟 36 秒
-
(已锁定)
Add DOM elements5 分钟 25 秒
-
(已锁定)
Challenge intro: Create elements1 分钟 17 秒
-
(已锁定)
Solution: Create elements3 分钟 35 秒
-
-
-
-
-
-
-