form (JavaScript 1.0)

An HTML form that collects user input.

Properties & Events

KeyDescriptionAvailability
actionURL to send the submitted results of the form.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
elementsArray of all of the elements in a form.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
encodingSpecifies how the form data should be encoded.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
lengthNumber of elements on a form.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
methodSpecifies whether the form data is sent to the server using "get" or "post".
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
nameName of the form.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
targetWindow or frame where the submitted results of the form should be displayed. (e.g. "_blank", "_self")
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
onresetOccurs when a user clicks the Reset button on a form.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
onsubmitOccurs when a user clicks a Submit button on a form.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0

Result from the Online TryIt-Editor
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 4.0

Examples having uses of: 'form'

0 votes
8k views

URL Encoding

In JavaScript there are functions that can be used to URL encode a string. In JavaScript you can use the encodeURI function
0 votes
8k views

JavaScript setTimeout and clearTimeout

JavaScript clearTimeout function enables you to stop the timer event started by the JavaScript setTimeout function. When you apply the setTimeout function using a recursive loop over the JavaScript function by specifying the time delay then it calls the function continuously after equal intervals of time.
2 votes
7k views

Html Textbox

The contents are interpreted as text only; HTML markup is ignored. The user can type (theoretically) unlimited amounts of text into the textarea field. In reality the browser sets the limit.
0 votes
7k views

CSS 2D Transform

CSS3 transform property allows us to scale, rotate, spin, stretch, and turn elements.
1 votes
6k views

JavaScript setTimeout function

JavaScript setTimeout function provides the functionality to execute the specified function after the sepcified number of milliseconds. Using the JavaScript setTimeout function you can set the delay before function execution.
2 votes
5k views

JavaScript Required Validation

JavaScript validation are client side scrips that is used to reduce the server load because all validation are check on client browser. This example has a required validation on the input box.
0 votes
1k views

HTML5 Keygen

The HTML <keygen> tag is used for generating a key pair. When the control's form is submitted, the private key is stored in the local keystore, and the public key is packaged and sent to the server.
2 votes
1k views

HTML Input

This HTML element specifies an input control for a form. The type of input is set by the type attribute and can be a variety of different types. (See Advanced HTML for more information about the different input types)
1 votes
1k views

JavaScript Numeric Validation

JavaScript validation are client side scrips that is used to reduce the server load because all validation are check on client browser. This example validates numeric characters on the input.
1 votes
1k views

Html Input Form

Example form using <legend> and <fieldset> to make the form layout fancy.
0 votes
1k views

JavaScript Keyboard Events

This event are fired when a key is pressed. IE 8 and earlier use event.keyCode to retrieve the key that was pressed down, while Firefox/Chrome/Safari/Opera use event.which.
0 votes
1k views

HTML Radio buttons and Checkboxes

Form containing two radio buttons and two checkboxes. Note: The name attribute is used to group the radio buttons and checkboxes into groups.
0 votes
1k views

JavaScript setTimeout method

Here in a text box the timer is display on "start count" button click and stop on "start count " click
1 votes
1k views

Javascript Email Address Validation

JavaScript validation are client side scrips that is used to reduce the server load because all validation are check on client browser. This example validates the input matches a valid e-mail address with a regular expression.
0 votes
1k views

HTML5 Output

Perform a calculation and show the result in an <output> element
0 votes
1k views

JavaScript Alphabetic Character Validation

JavaScript validation are client side scrips that is used to reduce the server load because all validation are check on client browser. This example validates alphabetic characters on the input
0 votes
1k views

CSS Transform and Rotate

CSS Transforms offers you the possibility to scale, rotate, reposition and skew an element through CSS. We can now combine this with CSS Transitions to create a nice example that will both scale and rotate an element when hovered
0 votes
1k views

HTML Password

Password Field <input type="password" /> defines a password field:
0 votes
1k views

CSS Fonts

Using CSS font properties we can set the color, hight , width ,size and alignment of the Font.
0 votes
1k views

CSS enabled & disabled

These are used to apply the properties on the elements that are either enable or disable.
0 votes
1k views

CSS 3D Transform

CSS3 allows you to format your elements using 3D transforms and here we have rotated 180 degrees around X axis.
0 votes
1k views

JavaScript Submit Event

This event is fired when the form is submitted. This is only works with the form element of the HTML.