Bab 4: DOM Manipulation
Bab 4: DOM Manipulation
4.1 Pengenalan Document Object Model (DOM)
4.1.1 Apa itu DOM?
4.1.2 DOM Tree Structure
// Contoh struktur DOM
/*
document
├── html
│ ├── head
│ │ ├── title
│ │ └── meta
│ └── body
│ ├── div
│ ├── p
│ └── script
*/
// Mengakses struktur DOM
console.log(document.documentElement); // html element
console.log(document.head); // head element
console.log(document.body); // body element4.2 Seleksi Element
4.2.1 Basic Selectors
4.2.2 Advanced Selection Methods
4.3 Modifikasi Element
4.3.1 Content Modification
4.3.2 Attributes Manipulation
4.3.3 Style Manipulation
4.4 Creating dan Removing Elements
4.4.1 Creating Elements
4.4.2 Adding Elements to DOM
4.4.3 Removing Elements
4.5 Event Handling
4.5.1 Basic Event Handling
4.5.2 Event Object Properties
4.5.3 Event Types
4.6 Event Bubbling dan Capturing
4.6.1 Event Flow
4.7 DOM Traversal
4.7.1 Node Navigation
4.8 Praktik dan Latihan
4.8.1 Project: Dynamic Form Generator
4.8.2 Project: Interactive Todo List
4.9 Performance Optimization
4.10 Best Practices
4.11 Ringkasan
4.12 Latihan Akhir Bab

Last updated