<html> <head> <script language="JavaScript"> function function1() { alert(myTextArea1.value); } </script> </head> <body onload="function1();"> <textarea id="myTextArea1">textarea value</textarea> </body> </html>