-
-
-
-
method:focus ();
return type:void
content:ใช้กำหนดให้ textarea ได้รับ focus
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.focus();
-
method:blur ();
return type:void
content:ใช้กำหนดให้ textarea สูญเสีย focus
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.blur();
-
method:click ();
return type:void
content:ใช้กำหนดให้ เหมือนมีการ click ที่ textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.click();
-
method:select ();
return type:void
content:ใช้กำหนดให้ มีแถบสีคลุมที่ textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.select();
-
property:name;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า name ของ textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.name );
-
property:id;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า id ของ textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.id );
-
property:value;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า value ของ textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.value );
-
property:defaultValue;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า default value ของ textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.defaultValue );
-
property:form;
return type:form
content:ใช้คืนค่า form element ของ textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.form );
-
property:cols;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า จำนวนตัวอักษรในแนวนอนของ textarea ( จะมีผลต่อขนาดความกว้าง )
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.cols );
-
property:rows;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า จำนวนแถวของ textarea ( จะมีผลต่อขนาดความสูง )
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.rows );
-
property:readOnly;
return type:boolean, void
content:ใช้ตรวจสอบ หรือกำหนดว่า textarea ใช้อ่านอย่างเดียวใช่หรือไม่ คือไม่สามารถเปลี่ยนแปลงข้อมูลภายในได้
example:var tagTextArea = document.getElementById ( "bamboo" );
if ( tagTextArea.readOnly )
{
alert ( "can not change data in textarea" );
}
-
property:tabIndex;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า ลำดับการได้รับ focus ของ textarea เมื่อกดปุ่ม tab
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.tagIndex = "5";
-
property:accessKey;
return type:string, void
content:ใช้ในการกำหนดค่า หรือคืนค่า คีย์ลัด ( จากการกดปุ่ม alt + key )
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.accessKey );
-
property:disabled;
return type:boolean, void
content:ใช้ตรวจสอบ หรือกำหนดค่า ว่าจะให้ textarea นี้ทำงานหรือไม่
example:var tagTextArea = document.getElementById ( "bamboo" );
if ( tagTextArea.disabled )
{
alert ( "textarea is not enabled" );
}
-
property:accept;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ชนิดของเนื้อหาที่จะส่งไป server
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.accept );
-
property:alt;
return type:string, void
content:ใช้กำหนดค่า หรือคืนค่า ข้อความที่ใช้แสดง ในกรณีที่ browser ไม่สนับสนุน object นี้
example:var tagTextArea = document.getElementById ( "bamboo" );
alert ( tagTextArea.alt );
-
property:onfocus = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ textarea ได้รับ focus
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onfocus = function()
{
alert ( "textarea gain focus" );
}
-
property:onblur = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ textarea สูญเสีย focus
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onblur = function()
{
alert ( "textarea loss focus" );
}
-
property:onclick = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ textarea ถูก click
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onclick = function()
{
alert ( "textarea be clicked" );
}
-
property:onkeypress = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ มีการกดปุ่มที่ textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onkeypress = function()
{
alert ( "textarea be keypressed" );
}
-
property:onkeydown = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ มีการกดปุ่มลงบน textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onkeydown = function()
{
alert ( "textarea be keydowned" );
}
-
property:onkeyup = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ มีการปล่อยปุ่มที่กดลงบน textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onkeyup = function()
{
alert ( "textarea be keyuped" );
}
-
property:onselectedstart = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ มีการเริ่มต้นลากแถบสีเลือกข้อความบน textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onselectedstart = function()
{
alert ( "textarea be start selected" );
}
-
property:onchange = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อ ข้อมูลใน textarea เปลี่ยนแปลง
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onchange = function()
{
alert ( "textarea be changed" );
}
-
property:onselect = function;
return type:void
content:ใช้กำหนดให้ function ทำงานเมื่อมีการลากแถบสีคลุมข้อความใน textarea
example:var tagTextArea = document.getElementById ( "bamboo" );
tagTextArea.onselect = function()
{
alert ( "textarea be selected" );
}