← Back to Home

Week 08 - JavaScript DOM & Events

Reference files for the live-coding demos, in teaching order. Open any example and use View Source (right-click → View Page Source) to read the code — then rebuild it yourself.

▶  Open the Interactive Slides

1. DOM Selectors

querySelector, getElementById

2. DOM Manipulation

Content, styles, attributes

3. Event Handling

Click, input, form events

4. Todo List

Complete DOM example

Tip: don't copy-paste. Type the code yourself, break it on purpose, then fix it. Use DevTools (F12) to inspect what's happening.