คุณสมบัติ navigator.appCodeName ของ HTML จะคืนค่าชื่อรหัสของเบราว์เซอร์ ไวยากรณ์ ไวยากรณ์มีดังนี้ − navigator.appCodeName ลองดูตัวอย่างการใช้งานคุณสมบัติ Navigator appCodeName ของ HTML − ตัวอย่าง <!DOCTYPE html> <html> <style> body { co
คุณสมบัติ navigator.appCodeName ของ HTML จะคืนค่าชื่อรหัสของเบราว์เซอร์ ไวยากรณ์ ไวยากรณ์มีดังนี้ − navigator.appCodeName ลองดูตัวอย่างการใช้งานคุณสมบัติ Navigator appCodeName ของ HTML − ตัวอย่าง <!DOCTYPE html> <html> <style> body { co
คุณสมบัติ navigator.appName ของ HTML จะคืนค่าชื่อของเบราว์เซอร์ ไวยากรณ์ ไวยากรณ์มีดังนี้ − navigator.appName ลองดูตัวอย่างการใช้งานคุณสมบัติ Navigator appName ของ HTML − ตัวอย่าง <!DOCTYPE html> <html> <style> body { color: #000;  
คุณสมบัติ navigator.appVersion ของ HTML จะคืนค่าข้อมูลเวอร์ชันของเบราว์เซอร์ ไวยากรณ์ ไวยากรณ์มีดังนี้ − navigator.appVersion ลองดูตัวอย่างการใช้งานคุณสมบัติ Navigator appVersion ของ HTML − ตัวอย่าง <!DOCTYPE html> <html> <style> body {
คุณสมบัติ navigator.cookieEnabled ของ HTML จะคืนค่าบูลีนที่ระบุว่าเบราว์เซอร์เปิดใช้งานคุกกี้หรือไม่ ไวยากรณ์ ไวยากรณ์มีดังนี้ − navigator.cookieEnabled ลองดูตัวอย่างการใช้งานคุณสมบัติ Navigator cookieEnabled ของ HTML − ตัวอย่าง <!DOCTYPE html> <html> <style> &nb
คุณสมบัติ navigator.geolocation ของ HTML จะคืนค่าออบเจ็กต์ Geolocation ซึ่งใช้สำหรับระบุตำแหน่งของผู้ใช้ ไวยากรณ์ ไวยากรณ์มีดังนี้ − navigator.geolocation ลองดูตัวอย่างการใช้งานคุณสมบัติ Navigator Geolocation ของ HTML − ตัวอย่าง <!DOCTYPE html> <html> <style> &nb
แอตทริบิวต์เหตุการณ์ onscroll ใน HTML ถูกกระตุ้นเมื่อองค์ประกอบ HTML ถูกเลื่อน (scroll) โดยใช้สกรอลบาร์ในเอกสาร HTML ไวยากรณ์ <tagname onscroll=script></tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear
แอตทริบิวต์เหตุการณ์ onsearch ใน HTML ถูกกระตุ้นเมื่อผู้ใช้กดปุ่ม Enter ในองค์ประกอบ input HTML ที่มี type=search ในเอกสาร HTML ไวยากรณ์ <input type=search onsearch=script> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: l
แอตทริบิวต์เหตุการณ์ onselect ใน HTML ถูกกระตุ้นเมื่อผู้ใช้เลือกข้อความบางส่วนขององค์ประกอบ HTML ในเอกสาร HTML ไวยากรณ์ <tagname onselect=script></tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gradi
แอตทริบิวต์เหตุการณ์ ontoggle ใน HTML ถูกกระตุ้นเมื่อผู้ใช้เปิดหรือปิดองค์ประกอบ <details> HTML ในเอกสาร HTML ไวยากรณ์ <details ontoggle=script>เนื้อหา</details> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background:
แอตทริบิวต์เหตุการณ์ onwheel ใน HTML ถูกกระตุ้นเมื่อผู้ใช้เลื่อนล้อเมาส์บนองค์ประกอบ HTML ในเอกสาร HTML ไวยากรณ์ <tagname onwheel=script>เนื้อหา</tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gradie
แอตทริบิวต์เหตุการณ์ onerror ใน HTML ถูกกระตุ้นเมื่อเกิดข้อผิดพลาดขณะโหลดไฟล์ภายนอกในเอกสาร HTML ไวยากรณ์ <tagname onerror=script>เนื้อหา</tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gradient(62de
แอตทริบิวต์เหตุการณ์ onkeydown ใน HTML ถูกกระตุ้นเมื่อผู้ใช้กำลังกดปุ่มบนคีย์บอร์ด (ค้างอยู่) ไวยากรณ์ <tagname onkeydown=script>เนื้อหา</tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gradient(62deg
แอตทริบิวต์เหตุการณ์ onkeyup ใน HTML ถูกกระตุ้นเมื่อผู้ใช้ปล่อยปุ่มบนคีย์บอร์ด ไวยากรณ์ <tagname onkeyup=script>เนื้อหา</tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7
แอตทริบิวต์เหตุการณ์ onkeypress ใน HTML ถูกกระตุ้นเมื่อผู้ใช้กดปุ่มบนคีย์บอร์ด ไวยากรณ์ <tagname onkeypress=script>เนื้อหา</tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%,
เมธอด window.alert() ใน HTML แสดงกล่องแจ้งเตือนพร้อมข้อความที่กำหนดและปุ่ม OK ในเอกสาร HTML ไวยากรณ์ alert(message); ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; tex
แอตทริบิวต์เหตุการณ์ oncontextmenu ใน HTML ถูกกระตุ้นเมื่อผู้ใช้คลิกขวาที่องค์ประกอบ HTML เพื่อเปิดเมนูบริบท (context menu) ในเอกสาร HTML ไวยากรณ์ <tagname oncontextmenu=script></tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height:
แอตทริบิวต์เหตุการณ์ ondrag ใน HTML ถูกกระตุ้นเมื่อผู้ใช้นำลาก (drag) องค์ประกอบ HTML ในเอกสาร HTML องค์ประกอบรูปภาพและลิงก์ถูกนำลากได้โดยค่าเริ่มต้น จึงไม่ต้องระบุ ondrag บนพวกมัน ไวยากรณ์ <tagname ondrag=script></tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <sty
แอตทริบิวต์เหตุการณ์ onfocus ใน HTML ใช้เมื่อองค์ประกอบ HTML ได้รับโฟกัส (focus) ในเอกสาร HTML ไวยากรณ์ <tagname onfocus=script></tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <meta name=viewport content=width=device-width, initial-scale=1.0> <style> bod
แอตทริบิวต์เหตุการณ์ oninput ใน HTML ถูกกระตุ้นเมื่อผู้ใช้ป้อนข้อมูลในองค์ประกอบ input/textarea HTML ในเอกสาร HTML ไวยากรณ์ <tagname oninput=script></tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gr
แอตทริบิวต์เหตุการณ์ oninvalid ใน HTML ถูกกระตุ้นเมื่อฟิลด์ input ไม่ผ่านการตรวจสอบขณะส่งฟอร์มในเอกสาร HTML ไวยากรณ์ <tagname oninvalid=script></tagname> ตัวอย่าง <!DOCTYPE html> <html> <head> <style> body { color: #000; height: 100vh; background: linear-gradien