| submit() | ใช้กำหนดให้ มีการ submit ที่ form |
|---|---|
| reset() | ใช้กำหนดให้ มีการ reset ที่ form |
| name | ใช้ในการกำหนดค่า หรือคืนค่า name ของ form |
| id | ใช้ในการกำหนดค่า หรือคืนค่า id ของ form |
| elements | ใช้ในการอ้างถึง element input ใน form |
| length | ใช้ในการคืนค่าจำนวน element ที่มีอยู่ทั้งหมดใน form |
| tabIndex | ใช้กำหนดค่า หรือคืนค่า ลำดับการได้รับ focus จากการกดปุ่ม tab ของ form |
| target | ใช้กำหนดค่า หรือคืนค่า ชื่อหน้าต่าง ที่ต้องการให้แสดง page ปลายทาง |
| action | ใช้กำหนดค่า หรือคืนค่า url ที่จะรับข้อมูลจาก form |
| action | ใช้กำหนดค่า หรือคืนค่า method ( วิธีการรับส่งข้อมูล ) ของ form เช่น GET, POST เป็นต้น |
| encoding | ใช้กำหนดค่า หรือคืนค่า รูปแบบการเข้ารหัสของ form |
| enctype | ใช้กำหนดค่า หรือคืนค่า ชนิดข้อมูลสำหรับการส่งข้อมูลของ form |
| acceptCharset | ใช้กำหนดค่า หรือคืนค่า ชุดของตัวอักษรท่ใช้ใน form |
| onsubmit | ใช้กำหนดให้ function ทำงานเมื่อ form ถูก submit |
| onreset | ใช้กำหนดให้ function ทำงานเมื่อ form ถูก reset |
method:submit ();
return type:void
content:ใช้กำหนดให้ มีการ submit ที่ form
example:var tagForm = document.getElementById ( "bamboo" ); tagForm.submit();
method:reset ();
return type:void
content:ใช้กำหนดให้ มีการ reset ที่ form
example:var tagForm = document.getElementById ( "bamboo" ); tagForm.reset();
property:name;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า name ของ form
example:var tagForm = document.getElementById ( "bamboo" ); alert ( tagForm.name );
property:id;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า id ของ form
example:var tagForm = document.getElementById ( "bamboo" ); alert ( tagForm.id );
property:elements;
return type:node array
content:ใช้ในการอ้างถึง element input ใน form
example:var tagForm = document.getElementById ( "bamboo" ); var length = tagForm.elements.length; for ( var i=0; i<length; i++ ) { alert ( tagForm.elements.item(i).tagName ); }
property:length;
return type:number
content:ใช้ในการคืนค่าจำนวน element ที่มีอยู่ทั้งหมดใน form
example:var tagForm = document.getElementById ( "bamboo" ); var length = tagForm.length; alert ( "number element of form : " + length );
property:tabIndex;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ลำดับการได้รับ focus จากการกดปุ่ม tab ของ form
example:var tagForm = document.getElementById ( "bamboo" ); tagForm.tagIndex = "2";
property:target;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ชื่อหน้าต่าง ที่ต้องการให้แสดง page ปลายทาง
example:var tagForm = document.getElementById ( "bamboo" ); alert ( tagForm.target );
property:action;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า url ที่จะรับข้อมูลจาก form
example:var tagForm = document.getElementById ( "bamboo" ); alert ( tagForm.action );
property:action;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า method ( วิธีการรับส่งข้อมูล ) ของ form เช่น GET, POST เป็นต้น
example:var tagForm = document.getElementById ( "bamboo" ); alert ( tagForm.method );
property:encoding;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า รูปแบบการเข้ารหัสของ form
example:var tagForm = document.getElementById ( "bamboo" ); alert ( tagForm.encoding );
property:enctype;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ชนิดข้อมูลสำหรับการส่งข้อมูลของ form
example:var tagForm = document.getElementById ( "bamboo" ); alert ( tagForm.enctype );
property:acceptCharset;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ชุดของตัวอักษรท่ใช้ใน form
example:var tagForm = document.getElementById ( "bamboo" ); alert ( tagForm.acceptCharset );
property:onsubmit = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ form ถูก submit
example:var tagTable = document.getElementById ( "bamboo" ); tagTable.onsubmit = function() { alert ( "form be submitted" ); }
property:onreset = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ form ถูก reset
example:var tagTable = document.getElementById ( "bamboo" ); tagTable.onreset = function() { alert ( "form be resetted" ); }