Interface HTMLTextAreaElement

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

public interface HTMLTextAreaElement extends HTMLElement
Provides special properties and methods for manipulating the layout and presentation of textarea elements.
  • Method Details

    • isAutocomplete

      boolean isAutocomplete()

      getAutocomplete.

      Returns:
      a Boolean object.
    • setAutocomplete

      void setAutocomplete(String autocomplete)

      setAutocomplete.

      Parameters:
      autocomplete - a String object.
    • isAutofocus

      boolean isAutofocus()
      Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
      Returns:
      a boolean.
    • setAutofocus

      void setAutofocus(boolean autofocus)

      setAutofocus.

      Parameters:
      autofocus - a boolean.
    • getCols

      int getCols()
      Sets or retrieves the width of the object.
      Returns:
      a Integer object.
    • setCols

      void setCols(Integer cols)

      setCols.

      Parameters:
      cols - a Integer object.
    • getDefaultValue

      String getDefaultValue()
      Sets or retrieves the initial contents of the object.
      Returns:
      a String object.
    • setDefaultValue

      void setDefaultValue(String defaultValue)

      setDefaultValue.

      Parameters:
      defaultValue - a String object.
    • getDirName

      String getDirName()

      getDirName.

      Returns:
      a String object.
    • setDirName

      void setDirName(String dirName)

      setDirName.

      Parameters:
      dirName - a String object.
    • isDisabled

      boolean isDisabled()

      isDisabled.

      Returns:
      a boolean.
    • setDisabled

      void setDisabled(boolean disabled)

      setDisabled.

      Parameters:
      disabled - a boolean.
    • getForm

      HTMLFormElement getForm()
      Retrieves a reference to the form that the object is embedded in.
      Returns:
      a HTMLFormElement object.
    • getLabels

      NodeList getLabels()

      getLabels.

      Returns:
      a NodeList object.
    • getMaxLength

      int getMaxLength()
      Sets or retrieves the maximum number of characters that the user can enter in a text control.
      Returns:
      a Integer object.
    • setMaxLength

      void setMaxLength(int maxLength)

      setMaxLength.

      Parameters:
      maxLength - a Integer object.
    • getMinLength

      int getMinLength()

      getMinLength.

      Returns:
      a Integer object.
    • setMinLength

      void setMinLength(int minLength)

      setMinLength.

      Parameters:
      minLength - a Integer 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.
    • getPlaceholder

      String getPlaceholder()
      Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
      Returns:
      a String object.
    • setPlaceholder

      void setPlaceholder(String placeholder)

      setPlaceholder.

      Parameters:
      placeholder - a String object.
    • isReadOnly

      boolean isReadOnly()
      Sets or retrieves the value indicated whether the content of the object is read-only.
      Returns:
      a boolean.
    • setReadOnly

      void setReadOnly(boolean readOnly)

      setReadOnly.

      Parameters:
      readOnly - a boolean.
    • isRequired

      boolean isRequired()
      When present, marks an element that can't be submitted without a value.
      Returns:
      a boolean.
    • setRequired

      void setRequired(boolean required)

      setRequired.

      Parameters:
      required - a boolean.
    • getRows

      int getRows()
      Sets or retrieves the number of horizontal rows contained in the object.
      Returns:
      a Integer object.
    • setRows

      void setRows(Integer rows)

      setRows.

      Parameters:
      rows - a Integer object.
    • getSelectionDirection

      String getSelectionDirection()

      getSelectionDirection.

      Returns:
      a String object.
    • setSelectionDirection

      void setSelectionDirection(String selectionDirection)

      setSelectionDirection.

      Parameters:
      selectionDirection - a String object.
    • getSelectionEnd

      int getSelectionEnd()
      Gets or sets the end position or offset of a text selection.
      Returns:
      a Integer object.
    • setSelectionEnd

      void setSelectionEnd(int selectionEnd)

      setSelectionEnd.

      Parameters:
      selectionEnd - a Integer object.
    • getSelectionStart

      int getSelectionStart()
      Gets or sets the starting position or offset of a text selection.
      Returns:
      a Integer object.
    • setSelectionStart

      void setSelectionStart(int selectionStart)

      setSelectionStart.

      Parameters:
      selectionStart - a Integer object.
    • getTextLength

      int getTextLength()

      getTextLength.

      Returns:
      a Integer object.
    • getValidationMessage

      String getValidationMessage()
      Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
      Returns:
      a String object.
    • getValidity

      ValidityState getValidity()
      Returns a ValidityState object that represents the validity states of an element.
      Returns:
      a ValidityState object.
    • getValue

      String getValue()
      Retrieves or sets the text in the entry field of the textArea element.
      Returns:
      a String object.
    • setValue

      void setValue(String value)

      setValue.

      Parameters:
      value - a String object.
    • isWillValidate

      boolean isWillValidate()
      Returns whether an element will successfully validate based on forms validation rules and constraints.
      Returns:
      a boolean.
    • getWrap

      String getWrap()
      Sets or retrieves how to handle wordwrapping in the object.
      Returns:
      a String object.
    • setWrap

      void setWrap(String wrap)

      setWrap.

      Parameters:
      wrap - 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.
    • select

      void select()
      Highlights the input area of a form element.
    • setCustomValidity

      void setCustomValidity(String error)
      Sets a custom error message that is displayed when a form is submitted.
      Parameters:
      error - Sets a custom error message that is displayed when a form is submitted.
    • setRangeText

      void setRangeText(String replacement)

      setRangeText.

      Parameters:
      replacement - a String object.
    • setRangeText

      void setRangeText(String replacement, int start, int end)

      setRangeText.

      Parameters:
      replacement - a String object.
      start - a Integer object.
      end - a Integer object.
    • setSelectionRange

      void setSelectionRange(int start, int end, Direction direction)
      Sets the start and end positions of a selection in a text field.
      Parameters:
      start - The offset into the text field for the start of the selection.
      end - The offset into the text field for the end of the selection.
      direction - The direction in which the selection is performed.
    • setSelectionRange

      void setSelectionRange(int start, int end)

      setSelectionRange.

      Parameters:
      start - a Integer object.
      end - a Integer object.