mozilla
Your Search Results

    HTMLFormElement.elements

    The HTMLFormElement.elements property returns an HTMLFormControlsCollection (HTML 4 HTMLCollection) of all the form controls contained in the FORM element, with the exception of input elements which have a type attribute of image.

    You can access a particular element by using either an index or the element name or id.

    Syntax

    nodeList = HTMLFormElement.elements
    

    Example

    var inputs = document.getElementById("form1").elements;
    var inputByIndex = inputs[2];
    var inputByName = inputs["login"];
    

    Specification

    Document Tags and Contributors

    Last updated by: teoli,
    Hide Sidebar