Interface HTMLFormElement

All Superinterfaces:
Element, EventTarget, HTMLElement, InnerHTML, Node, NonDocumentTypeChildNode, ParentNode
All Known Implementing Classes:
HTMLFormElementImpl

public interface HTMLFormElement extends HTMLElement
A <form> element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.
  • Method Details

    • getAcceptCharset

      String getAcceptCharset()
      Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
      Returns:
      a String object.
    • setAcceptCharset

      void setAcceptCharset(String acceptCharset)

      setAcceptCharset.

      Parameters:
      acceptCharset - a String object.
    • getAction

      String getAction()
      Sets or retrieves the URL to which the form content is sent for processing.
      Returns:
      a String object.
    • setAction

      void setAction(String action)

      setAction.

      Parameters:
      action - a String object.
    • getAutocomplete

      String getAutocomplete()
      Specifies whether autocomplete is applied to an editable text field.
      Returns:
      a String object.
    • setAutocomplete

      void setAutocomplete(String autocomplete)

      setAutocomplete.

      Parameters:
      autocomplete - a String object.
    • getElements

      Retrieves a collection, in source order, of all controls in a given form.
      Returns:
      a HTMLFormControlsCollection object.
    • getEncoding

      String getEncoding()
      Sets or retrieves the MIME encoding for the form.
      Returns:
      a String object.
    • setEncoding

      void setEncoding(String encoding)

      setEncoding.

      Parameters:
      encoding - a String object.
    • getEnctype

      String getEnctype()
      Sets or retrieves the encoding type for the form.
      Returns:
      a String object.
    • setEnctype

      void setEnctype(String enctype)

      setEnctype.

      Parameters:
      enctype - a String object.
    • getLength

      int getLength()
      Sets or retrieves the number of objects in a collection.
      Returns:
      a Integer object.
    • getMethod

      String getMethod()
      Sets or retrieves how to send the form data to the server.
      Returns:
      a String object.
    • setMethod

      void setMethod(String method)

      setMethod.

      Parameters:
      method - a String object.
    • getName

      String getName()
      Sets or retrieves the name of the object.
      Returns:
      a String object.
    • setName

      void setName(String name)

      setName.

      Parameters:
      name - a String object.
    • isNoValidate

      boolean isNoValidate()
      Designates a form that is not validated when submitted.
      Returns:
      a boolean.
    • setNoValidate

      void setNoValidate(boolean noValidate)

      setNoValidate.

      Parameters:
      noValidate - a boolean.
    • getTarget

      String getTarget()
      Sets or retrieves the window or frame at which to target content.
      Returns:
      a String object.
    • setTarget

      void setTarget(String target)

      setTarget.

      Parameters:
      target - a String object.
    • checkValidity

      boolean checkValidity()
      Returns whether a form will validate when it is submitted, without having to submit it.
      Returns:
      a boolean.
    • reportValidity

      boolean reportValidity()

      reportValidity.

      Returns:
      a boolean.
    • reset

      void reset()
      Fires when the user resets a form.
    • submit

      void submit()
      Fires when a FORM is about to be submitted.