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