Reset.form

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

							reset.form

Description

The form property of the Reset object is used to obtain the name of the form that contains the Reset button.

Example

Listing 7.448 shows an example of how to get the form name.

Listing 7.448 Example of Using the form Property
<html>
<head>
<title> Example of the reset form property</title>
</head>
<body>

<form name="form1">
Enter Name: <input type="text" Name="name" Size=15>
<br>
Enter Phone: <input type="text" Name="phone" Size=10>
<br><br>
<input type="reset" name=resetbutton value=Reset
onClick='alert("The form name is: " + document.form1.resetbutton.form.name)'>
<br>
<br>
</form>

</body>
</html>
							
							
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.