<html>
<head>
<script language="JavaScript">
<!--
function getName(){
alert("The name of this text box is " + document.myForm.elements[0].name);
}
-->
</script>
</head>
<body>
<form name="myForm">
<input type=TEXT value="First Box" name="myText">
<input type=BUTTON value="Get Name" name="myButton" onClick='getName()'>
</form>
</body>
</html>
|