Form.action

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

							form.action

Description

The action property represents the ACTION attribute of the HTML <form> tag. It is typically the URL to which the form is being submitted.

Example

Listing 7.255 shows one method of how to use the Form object to access the action property of the HTML form. The action property specifies the server and program to which the form is submitted.

Listing 7.255 Accessing the Action Value of the Form Object
 <html> <head> <title> Using the action property of the Form object</title> </head> <body> <script language="JavaScript"> <!-- Hide function getAction(){ var actionValue = document.form1.action; document.form1.msg.value = "Your form was submitted ...

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.