| focus() | ใช้กำหนดให้ submit ได้รับ focus |
|---|---|
| blur() | ใช้กำหนดให้ submit สูญเสีย focus |
| click() | ใช้กำหนดให้ เหมือนมีการ click ที่ submit |
| select() | ใช้กำหนดให้ มีแถบสีคลุมที่ submit |
| name | ใช้ในการกำหนดค่า หรือคืนค่า name ของ submit |
| id | ใช้ในการกำหนดค่า หรือคืนค่า id ของ submit |
| type | ใช้ในการกำหนดค่า หรือคืนค่า type ของ submit |
| value | ใช้ในการกำหนดค่า หรือคืนค่า value ของ submit |
| defaultValue | ใช้ในการกำหนดค่า หรือคืนค่า default value ของ submit |
| form | ใช้คืนค่า form element ของ submit |
| size | ใช้ในการกำหนดค่า หรือคืนค่า ขนาด ของ submit |
| tabIndex | ใช้ในการกำหนดค่า หรือคืนค่า ลำดับการได้รับ focus ของ submit เมื่อกดปุ่ม tab |
| accessKey | ใช้ในการกำหนดค่า หรือคืนค่า คีย์ลัด ( จากการกดปุ่ม alt + key ) |
| disabled | ใช้ตรวจสอบ หรือกำหนดค่า ว่าจะให้ submit นี้ทำงานหรือไม่ |
| accept | ใช้กำหนดค่า หรือคืนค่า ชนิดของเนื้อหาที่จะส่งไป server |
| align | ใช้กำหนดค่า หรือคืนค่า ตำแหน่งข้อความ ภายใน submit |
| alt | ใช้กำหนดค่า หรือคืนค่า ข้อความที่ใช้แสดง ในกรณีที่ browser ไม่สนับสนุน object นี้ |
| onfocus | ใช้กำหนดให้ function ทำงานเมื่อ submit ได้รับ focus |
| onblur | ใช้กำหนดให้ function ทำงานเมื่อ submit สูญเสีย focus |
| onclick | ใช้กำหนดให้ function ทำงานเมื่อ submit ถูก click |
| onselectedstart | ใช้กำหนดให้ function ทำงานเมื่อ มีการเริ่มต้นลากแถบสีเลือกข้อความบน submit |
| onselect | ใช้กำหนดให้ function ทำงานเมื่อมีการลากแถบสีคลุมข้อความใน submit |
method:focus ();
return type:void
content:ใช้กำหนดให้ submit ได้รับ focus
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.focus();
method:blur ();
return type:void
content:ใช้กำหนดให้ submit สูญเสีย focus
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.blur();
method:click ();
return type:void
content:ใช้กำหนดให้ เหมือนมีการ click ที่ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.click();
method:select ();
return type:void
content:ใช้กำหนดให้ มีแถบสีคลุมที่ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.select();
property:name;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า name ของ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.name );
property:id;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า id ของ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.id );
property:type;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า type ของ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.type );
property:value;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า value ของ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.value );
property:defaultValue;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า default value ของ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.defaultValue );
property:form;
return type:form
content:ใช้คืนค่า form element ของ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.form );
property:size;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า ขนาด ของ submit
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.size );
property:tabIndex;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า ลำดับการได้รับ focus ของ submit เมื่อกดปุ่ม tab
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.tagIndex = "5";
property:accessKey;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า คีย์ลัด ( จากการกดปุ่ม alt + key )
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.accessKey );
property:disabled;
return type:boolean, void
content:ใช้ตรวจสอบ หรือกำหนดค่า ว่าจะให้ submit นี้ทำงานหรือไม่
example:var tagSubmit = document.getElementById ( "bamboo" ); if ( tagSubmit.disabled ) { alert ( "submit is not enabled" ); }
property:accept;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ชนิดของเนื้อหาที่จะส่งไป server
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.accept );
property:align;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ตำแหน่งข้อความ ภายใน submit โดยค่าข้อมูลที่เป็นไปได้ คือ right, left, center
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.align = "right";
property:alt;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ข้อความที่ใช้แสดง ในกรณีที่ browser ไม่สนับสนุน object นี้
example:var tagSubmit = document.getElementById ( "bamboo" ); alert ( tagSubmit.alt );
property:onfocus = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ submit ได้รับ focus
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.onfocus = function() { alert ( "submit gain focus" ); }
property:onblur = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ submit สูญเสีย focus
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.onblur = function() { alert ( "submit loss focus" ); }
property:onclick = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ submit ถูก click
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.onclick = function() { alert ( "submit be clicked" ); }
property:onselectedstart = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ มีการเริ่มต้นลากแถบสีเลือกข้อความบน submit
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.onselectedstart = function() { alert ( "submit be start selected" ); }
property:onselect = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อมีการลากแถบสีคลุมข้อความใน submit
example:var tagSubmit = document.getElementById ( "bamboo" ); tagSubmit.onselect = function() { alert ( "submit be selected" ); }