<html>
<head>
<script language="JavaScript">
<!--
function getName(){
alert("The name of this text area is " + document.myForm.elements[0].name);
}
-->
</script>
</head>
<body>
<form name="myForm">
<textarea name="myTextArea" rows=6 cols=50>
Here is some text in my text area.
</textarea>
<input type=BUTTON value="Get Name" name="myButton" onClick='getName()'>
</form>
</body>
</html>
|