<html> <head> <script language="JavaScript"> function function1() { alert("The 'myTextArea' element has a type value of:\n"+myTextArea.type); } </script> </head> <body> <textarea name="myTextArea" cols="20" rows="8"> </textarea> <input type="button" value="Click here" onClick="function1();"> </body> </html>