This website requires JavaScript.
Explore
Help
Register
Sign In
rou
/
front-end-example
Watch
1
Star
0
Fork
0
You've already forked front-end-example
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
8b83f63235cc36353f7fc03c05dee40ff0434dc9
front-end-example
/
04-dom-events-async
/
01-query-selectors
History
rou
1071f4db05
update
2026-03-23 14:56:04 +08:00
..
answer.html
feat: add TypeScript lessons and learning panel
2026-03-19 10:06:11 +08:00
answer.js
feat: add TypeScript lessons and learning panel
2026-03-19 10:06:11 +08:00
README.md
feat: add TypeScript lessons and learning panel
2026-03-19 10:06:11 +08:00
starter.html
update
2026-03-23 14:56:04 +08:00
starter.js
update
2026-03-23 14:56:04 +08:00
README.md
Unescape
Escape
练习 1
:
获取元素
目标
学会用几种常见方式拿到页面元素。
你要练什么
getElementById
querySelector
querySelectorAll
元素文本读取
任务
请基于页面结构完成以下操作:
选中主标题
选中“开始学习”按钮
选中全部学习卡片
在控制台输出标题文字、按钮文字和卡片数量
文件
starter.html
starter.js
answer.html
answer.js