The JavaScript Form object serves a number purposes. It acts a container for all of the GUI objects that make up a form. It also acts as the mechansism for grouping together the information provided by the user and sending it back to the server for processing.
+
The HTML Form object serves a number of purposes. It acts a container for all of the GUI objects that make up a form. It also acts as the mechansism for grouping together the information provided by the user and sending it back to the server for processing.
The ''<form>'' takes a number of attributes of which the following are the most commonly used:
The ''<form>'' takes a number of attributes of which the following are the most commonly used:
−
* '''name''' - the name of the form, which will be used when referencing objects within the the form four JavaScript code.
+
* '''name''' - the name of the form, which will be used when referencing objects within the form using JavaScript code.
−
* '''method''' - the method by which data is sent to the server. This will either be "GET" ot "POST" depdniong on the server-side configuration.
+
* '''method''' - the method by which data is sent to the server. This will either be "GET" ot "POST" depending on the server-side configuration.
* '''action''' - the URL of the CGI script to which the data entered by the user will be sent. It is also possible to use ''mailto:'' to have the data sent to an email address.
* '''action''' - the URL of the CGI script to which the data entered by the user will be sent. It is also possible to use ''mailto:'' to have the data sent to an email address.