August 1999
Intermediate to advanced
1488 pages
72h 53m
English
form.name
The name property of the Form object represents the name of the form as specified in the HTML <form> tag.
Listing 7.262 shows how the name property is used to get the HTML NAME attribute of the form. The showName function uses the Form object to access the name attribute of the form.
<html>
<head>
<title>Access the name property of the Form object</title>
</head>
<body>
<script language="JavaScript">
<!-- Hide
function showName(){
// Alert box tells what the name of the form is
alert("Form Name is: " + document.form1.name);
}
// End Hide --->
</script>
<form name ="form1" > Dummy input text box. ... |
Read now
Unlock full access