HTML DOM Textarea type property
Definition and Usage
type property returns the type of form elements.
For text box will always be "textarea".
grammar
textareaObject.type
Browser Support
All major browsers support attribute type
Examples
Examples
Returns the type of form element:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult ()
{
alert (document.getElementById ( "myTextarea") type.);
}
</ Script>
</ Head>
<Body>
<Textarea id = "myTextarea" cols = "20">
In this tutorial, you can learn a lot more programming basics, including a variety of front-end content HTML, XML, SQL, ASP, and PHP.
</ Textarea>
<br>
<Button type = "button" onclick = "displayResult ()"> Returns the type of form element </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult ()
{
alert (document.getElementById ( "myTextarea") type.);
}
</ Script>
</ Head>
<Body>
<Textarea id = "myTextarea" cols = "20">
In this tutorial, you can learn a lot more programming basics, including a variety of front-end content HTML, XML, SQL, ASP, and PHP.
</ Textarea>
<br>
<Button type = "button" onclick = "displayResult ()"> Returns the type of form element </ button>
</ Body>
</ Html>
Textarea object