กลับหน้าบทเรียน
Export PDF
# สัปดาห์ที่ 7 Form Validation และการจัดการข้อมูล --- ## Good Form UX - Label ชัดเจน - Input type เหมาะสม - Error message อ่านรู้เรื่อง - Feedback อยู่ใกล้จุดที่ผิด --- ## HTML Validation ```html
``` --- ## Submit Event ```js form.addEventListener("submit", (event) => { event.preventDefault(); }); ``` --- ## Local Storage ```js localStorage.setItem("theme", "dark"); const theme = localStorage.getItem("theme"); ``` --- ## กิจกรรม สร้างฟอร์มพร้อม validation และบันทึกข้อมูลลง Local Storage