| name | ใช้ในการกำหนดค่า หรือคืนค่า ชื่อ ของ iframe |
|---|---|
| id | ใช้ในการกำหนดค่า หรือคืนค่า id ของ iframe |
| src | ใช้ในการกำหนดค่า หรือคืนค่า url ของ iframe |
| contentDocument | ใช้คืนค่า รายละเอียด ( ข้อมูลต่างๆ ) ที่อยู่ใน iframe |
| longDesc | ใช้คืนค่า url ที่ใช้อธิบานเนื้อหาของ iframe |
| scrolling | ใช้ตรวจสอบว่า iframe มี scrollbar หรือไม่ |
| frameBorder | ใช้ตรวจสอบว่า iframe มี เส้นขอบ หรือไม่ |
| marginHeight | ใช้กำหนดค่า หรือคืนค่า ความสูงของ iframe |
| marginWidth | ใช้กำหนดค่า หรือคืนค่า ความกว้างของ iframe |
| align | ใช้กำหนดค่า หรือคืนค่า การจัดตำแหน่งให้กับ element ใน iframe |
| tabIndex | ใช้กำหนดค่า หรือคืนค่า ลำดับการได้รับ focus จากการกดปุ่ม tab |
| width | ใช้กำหนดค่า หรือคืนค่า ความกว้างของ iframe |
| height | ใช้กำหนดค่า หรือคืนค่า ความสูงของ iframe |
| focus() | ใช้กำหนดให้ iframe ได้รับ focus |
| blur() | ใช้กำหนดให้ iframe สูญเสีย focus |
| onfocus | จะทำงานตาม function ที่กำหนด เมื่อ iframe ได้รับ focus |
| onblur | จะทำงานตาม function ที่กำหนด เมื่อ iframe สูญเสีย focus |
property:name;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า ชื่อ ของ iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); alert ( tagIFrame.name );
property:id;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า id ของ iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); alert ( tagIFrame.id );
property:src;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า url ของ iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.src = "http://www.bamboolabcode.com";
property:contentDocument;
return type:string
content:ใช้คืนค่า รายละเอียด ( ข้อมูลต่างๆ ) ที่อยู่ใน iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); alert ( tagIFrame.contentDocument );
property:longDesc;
return type:string
content:ใช้คืนค่า url ที่ใช้อธิบานเนื้อหาของ iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); alert ( tagIFrame.longDesc );
property:scrolling;
return type:boolean
content:ใช้ตรวจสอบว่า iframe มี scrollbar หรือไม่
example:var tagIFrame = document.getElementById ( "bamboo" ); if ( tagIFrame.scrolling ) { alert ( "frame scrollable" ); }
property:frameBorder;
return type:boolean
content:ใช้ตรวจสอบว่า iframe มี เส้นขอบ หรือไม่
example:var tagIFrame = document.getElementById ( "bamboo" ); if ( tagIFrame.frameBorder ) { alert ( "frame borderable" ); }
property:marginHeight;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ความสูงของ iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.marginHeight = "20px";
property:marginWidth;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ความกว้างของ iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.marginWidth = "20px";
property:align;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า การจัดตำแหน่งให้กับ element ใน iframe โดยค่าข้อมูลของ align ได้แก่ left, right, top, middle, buttom
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.align = "right";
property:tabIndex;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ลำดับการได้รับ focus จากการกดปุ่ม tab
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.tabIndex = 3;
property:width;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ความกว้างของ iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.width = "500px";
property:height;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ความสูงของ iframe
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.height = "800px";
method:focus ();
return type:void
content:ใช้กำหนดให้ iframe ได้รับ focus
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.focus();
method:blur ();
return type:void
content:ใช้กำหนดให้ iframe สูญเสีย focus
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.blur();
property:onfocus = function;
return type:void
content:จะทำงานตาม function ที่กำหนด เมื่อ iframe ได้รับ focus
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.onfocus = function () { alert ( "welcome" ); }
property:onblur = function;
return type:void
content:จะทำงานตาม function ที่กำหนด เมื่อ iframe สูญเสีย focus
example:var tagIFrame = document.getElementById ( "bamboo" ); tagIFrame.onblur = function () { alert ( "good bye" ); }