| คำสั่งที่ใช้ในการกำหนดให้ Event ไม่ทำงาน | ใช้กำหนดให้ Event ไม่ทำงาน คือเหมือนไม่มี Event เกิดขึ้น |
|---|
subject:คำสั่งที่ใช้ในการกำหนดให้ Event ไม่ทำงาน ( ของ browser Netscape )
syntax:preventDefault ();
content:ใช้กำหนดให้ Event ไม่ทำงาน คือเหมือนไม่มี Event เกิดขึ้น
example:function notInputData ( event ) { event.preventDefault(); } var tagText = document.getElementById ( "bamboo" ); tagText.addEventListener ( "keypress", notInputData, false );