Textarea.type

JavaScript1.1+, JScript1.0+ Nav3+, IE3+, Opera3+ Syntax

							textarea.type

Description

The type property of an instance of a Textarea object returns the type of the text area. This always returns textarea.

Example

Listing 7.521 has a text area and a button. When the button is clicked, an alert box is popped up that displays the type property of the text area.

Listing 7.521 Displaying the type Property in an Alert Box
 <html> <head> <script language="JavaScript1.1"> <!-- Hide // Display an alert box that contains the type of the // text area. function getType(){ alert("The name of this text area is " + document.myForm.elements[0].type); } // End hide ---> </script> </head> <body> <form name="myForm"> <textarea name="myTextArea" ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.