Class Input


@Bean(typeName="input") public class Input extends HtmlElementVoid
DTO for an HTML <input> element.

The input element represents a form control that allows users to input data. It is a void element that can take many different forms depending on the type attribute, including text fields, checkboxes, radio buttons, file uploads, and more. The input element is one of the most versatile and commonly used form controls in HTML.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Text input field Input input1 = input("text") .name("username") .placeholder("Enter your username") .required(true); // Email input with validation Input input2 = input("email") .name("email") .placeholder("your@email.com") .autocomplete("email"); // File upload input Input input3 = input("file") .name("avatar") .accept("image/*") .multiple(true); // Checkbox input Input input4 = input("checkbox") .name("subscribe") .value("yes") .checked(true); // Password input with pattern Input input5 = input("password") .name("password") .pattern(".{8,}") .title("Password must be at least 8 characters");

The following convenience methods are provided for constructing instances of this bean:

See Also:
  • Constructor Details

  • Method Details

    • accept

      public Input accept(String value)
      accept attribute.

      Specifies which file types the file input should accept. Used with type="file".

      Examples:

      • "image/*" - Accept all image files
      • ".pdf,.doc,.docx" - Accept specific file extensions
      • "image/png,image/jpeg" - Accept specific MIME types
      Parameters:
      accept - File type restrictions for file uploads.
      Returns:
      This object.
    • alt

      public Input alt(String value)
      alt attribute.

      Alternative text for image submit buttons. Used with type="image" to provide accessible text when the image cannot be displayed.

      Parameters:
      alt - Alternative text for image submit buttons.
      Returns:
      This object.
    • autocomplete

      public Input autocomplete(String value)
      autocomplete attribute.

      Controls whether the browser can automatically complete the input field.

      Common values:

      • "on" - Allow autocomplete (default)
      • "off" - Disable autocomplete
      • "name" - Full name
      • "email" - Email address
      • "username" - Username or login
      • "current-password" - Current password
      • "new-password" - New password
      • "tel" - Telephone number
      • "url" - URL
      • "address-line1" - Street address
      • "country" - Country name
      • "postal-code" - Postal code
      Parameters:
      autocomplete - Autocomplete hint for the input field.
      Returns:
      This object.
    • autofocus

      public Input autofocus(Object value)
      autofocus attribute.

      Automatically focuses the form control when the page loads. Only one element per page should have this attribute.

      Parameters:
      autofocus - The new value for this attribute. Typically a Boolean or String.
      Returns:
      This object.
    • checked

      public Input checked(Object value)
      checked attribute.

      Whether the command or control is checked.

      This attribute uses deminimized values:

      • false - Attribute is not added
      • true - Attribute is added as "checked"
      • Other values - Passed through as-is
      Parameters:
      checked - The new value for this attribute. Typically a Boolean or String.
      Returns:
      This object.
    • dirname

      public Input dirname(String value)
      dirname attribute.

      Specifies the name of a hidden form field that will be submitted along with the input value, containing the text direction (ltr or rtl) of the input content.

      This is useful for forms that need to preserve text direction information when submitted. The hidden field will contain either "ltr" or "rtl" based on the input's direction.

      Parameters:
      dirname - The name of the hidden field for directionality information.
      Returns:
      This object.
    • disabled

      public Input disabled(Object value)
      disabled attribute.

      Whether the form control is disabled.

      This attribute uses deminimized values:

      • false - Attribute is not added
      • true - Attribute is added as "disabled"
      • Other values - Passed through as-is
      Parameters:
      disabled - The new value for this attribute. Typically a Boolean or String.
      Returns:
      This object.
    • form

      public Input form(String value)
      form attribute.

      Associates the input with a form element by specifying the form's ID. This allows the input to be placed outside the form element while still being part of the form.

      The value should match the ID of a form element in the same document.

      Parameters:
      form - The ID of the form element to associate with this input.
      Returns:
      This object.
    • formaction

      public Input formaction(String value)
      formaction attribute.

      URL to use for form submission.

      Parameters:
      formaction - The new value for this attribute.
      Returns:
      This object.
    • formenctype

      public Input formenctype(String value)
      formenctype attribute.

      Form data set encoding type to use for form submission.

      Parameters:
      formenctype - The new value for this attribute.
      Returns:
      This object.
    • formmethod

      public Input formmethod(String value)
      formmethod attribute.

      HTTP method to use for form submission.

      Parameters:
      formmethod - The new value for this attribute.
      Returns:
      This object.
    • formnovalidate

      public Input formnovalidate(String value)
      formnovalidate attribute.

      Bypass form control validation for form submission.

      Parameters:
      formnovalidate - The new value for this attribute.
      Returns:
      This object.
    • formtarget

      public Input formtarget(String value)
      formtarget attribute.

      Browsing context for form submission.

      Parameters:
      formtarget - The new value for this attribute.
      Returns:
      This object.
    • height

      public Input height(Object value)
      height attribute.

      Vertical dimension.

      Parameters:
      height - The new value for this attribute. Typically a Number or String.
      Returns:
      This object.
    • inputmode

      public Input inputmode(String value)
      inputmode attribute.

      Provides a hint to browsers about the type of virtual keyboard to display on mobile devices.

      Possible values:

      • "none" - No virtual keyboard
      • "text" - Standard text keyboard (default)
      • "tel" - Numeric keypad for telephone numbers
      • "url" - Keyboard optimized for URLs
      • "email" - Keyboard optimized for email addresses
      • "numeric" - Numeric keypad
      • "decimal" - Numeric keypad with decimal point
      • "search" - Keyboard optimized for search
      Parameters:
      inputmode - The input modality hint for mobile keyboards.
      Returns:
      This object.
    • list

      public Input list(String value)
      list attribute.

      References a <datalist> element that provides predefined options for the input field. Creates a dropdown with autocomplete suggestions.

      Parameters:
      list - The ID of a datalist element (without the # prefix).
      Returns:
      This object.
    • max

      public Input max(Object value)
      max attribute.

      Maximum value.

      Parameters:
      max - The new value for this attribute. Typically a Number or String.
      Returns:
      This object.
    • maxlength

      public Input maxlength(Object value)
      maxlength attribute. Maximum length of value.
      Parameters:
      maxlength - The new value for this attribute. Typically a Number or String.
      Returns:
      This object.
    • min

      public Input min(Object value)
      min attribute.

      Minimum value.

      Parameters:
      min - The new value for this attribute. Typically a Number or String.
      Returns:
      This object.
    • minlength

      public Input minlength(Object value)
      minlength attribute.

      Minimum length of value.

      Parameters:
      minlength - The new value for this attribute. Typically a Number or String.
      Returns:
      This object.
    • multiple

      public Input multiple(Object value)
      multiple attribute.

      Whether to allow multiple values.

      This attribute uses deminimized values:

      • false - Attribute is not added
      • true - Attribute is added as "multiple"
      • Other values - Passed through as-is
      Parameters:
      multiple - The new value for this attribute. Typically a Boolean or String.
      Returns:
      This object.
    • name

      public Input name(String value)
      name attribute.

      Name of form control to use for form submission and in the form.elements API.

      Parameters:
      name - The new value for this attribute.
      Returns:
      This object.
    • pattern

      public Input pattern(String value)
      pattern attribute.

      Specifies a regular expression that the input's value must match for the form to be valid. Works with the title attribute to provide user feedback.

      Parameters:
      pattern - A regular expression pattern (e.g., "[0-9]{3}-[0-9]{3}-[0-9]{4}" for phone numbers).
      Returns:
      This object.
    • placeholder

      public Input placeholder(String value)
      placeholder attribute.

      Provides a hint to the user about what to enter in the input field. The placeholder text appears when the field is empty and disappears when the user starts typing.

      Parameters:
      placeholder - Hint text to display in the empty input field.
      Returns:
      This object.
    • readonly

      public Input readonly(Object value)
      readonly attribute.

      Makes the input field read-only, preventing user modification while still allowing the value to be submitted with the form.

      Parameters:
      readonly - If true, makes the input read-only.
      Returns:
      This object.
    • readonly

      public Input readonly(boolean value)
      readonly attribute.

      Whether to allow the value to be edited by the user.

      Parameters:
      value - If true, adds readonly="readonly".
      Returns:
      This object.
    • required

      public Input required(Object value)
      required attribute.

      Indicates that the input field must be filled out before the form can be submitted. Browsers will show validation messages for empty required fields.

      Parameters:
      required - If true, makes the input required for form submission.
      Returns:
      This object.
    • size

      public Input size(Object value)
      size attribute.

      Size of the control.

      Parameters:
      size - The new value for this attribute. Typically a Number or String.
      Returns:
      This object.
    • src

      public Input src(Object value)
      src attribute.

      Address of the resource.

      Parameters:
      src - The new value for this attribute. Typically a URL or String.
      Returns:
      This object.
    • step

      public Input step(String value)
      step attribute.

      Granularity to be matched by the form control's value.

      Parameters:
      step - The new value for this attribute.
      Returns:
      This object.
    • type

      public Input type(String value)
      type attribute.

      Specifies the type of form control to display.

      Common values:

      • "text" - Single-line text input (default)
      • "password" - Password input (characters are masked)
      • "email" - Email address input with validation
      • "number" - Numeric input with spinner controls
      • "tel" - Telephone number input
      • "url" - URL input with validation
      • "search" - Search input field
      • "date" - Date picker
      • "time" - Time picker
      • "datetime-local" - Date and time picker
      • "checkbox" - Checkbox input
      • "radio" - Radio button input
      • "file" - File upload input
      • "submit" - Submit button
      • "button" - Generic button
      • "reset" - Reset form button
      • "hidden" - Hidden input field
      Parameters:
      type - The input type for the form control.
      Returns:
      This object.
    • value

      public Input value(Object value)
      value attribute.

      Value of the form control.

      Parameters:
      value - The new value for this attribute. Typically a Number or String.
      Returns:
      This object.
    • width

      public Input width(Object value)
      width attribute.

      Horizontal dimension.

      Parameters:
      width - The new value for this attribute. Typically a Number or String.
      Returns:
      This object.
    • _class

      public Input _class(String value)
      Description copied from class: HtmlElement
      class attribute.

      Specifies one or more CSS class names for the element, separated by spaces. These classes can be used for styling and JavaScript selection.

      Overrides:
      _class in class HtmlElementVoid
      Returns:
      This object.
    • accesskey

      public Input accesskey(String value)
      Description copied from class: HtmlElement
      accesskey attribute.

      Defines a keyboard shortcut to activate or focus an element. The value should be a single character that, when pressed with a modifier key (usually Alt), activates the element.

      Overrides:
      accesskey in class HtmlElementVoid
      Returns:
      This object.
    • contenteditable

      public Input contenteditable(Object value)
      Description copied from class: HtmlElement
      contenteditable attribute.

      Indicates whether the element's content is editable by the user.

      Possible values:

      • "true" or empty string - Element content is editable
      • "false" - Element content is not editable
      • "plaintext-only" - Element content is editable, but rich text formatting is disabled
      Overrides:
      contenteditable in class HtmlElementVoid
      Returns:
      This object.
    • dir

      public Input dir(String value)
      Description copied from class: HtmlElement
      dir attribute.

      Specifies the text direction of the element's content.

      Possible values:

      • "ltr" - Left-to-right text direction
      • "rtl" - Right-to-left text direction
      • "auto" - Browser determines direction based on content
      Overrides:
      dir in class HtmlElementVoid
      Returns:
      This object.
    • hidden

      public Input hidden(Object value)
      Description copied from class: HtmlElement
      hidden attribute.

      This attribute uses deminimized values:

      • false - Attribute is not added
      • true - Attribute is added as "hidden"
      • Other values - Passed through as-is
      Overrides:
      hidden in class HtmlElementVoid
      Returns:
      This object.
    • id

      public Input id(String value)
      Description copied from class: HtmlElement
      id attribute.

      Specifies a unique identifier for the element. The ID must be unique within the document and can be used for CSS styling, JavaScript selection, and anchor links.

      Overrides:
      id in class HtmlElementVoid
      Returns:
      This object.
    • lang

      public Input lang(String value)
      Description copied from class: HtmlElement
      lang attribute.

      Specifies the primary language of the element's content using a language tag. This helps with accessibility, search engines, and browser features like spell checking.

      Overrides:
      lang in class HtmlElementVoid
      Returns:
      This object.
    • onabort

      public Input onabort(String value)
      Description copied from class: HtmlElement
      onabort attribute.

      Event handler for when an operation is aborted (e.g., image loading is cancelled).

      Overrides:
      onabort in class HtmlElementVoid
      Returns:
      This object.
    • onblur

      public Input onblur(String value)
      Description copied from class: HtmlElement
      onblur attribute.

      Event handler for when the element loses focus.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onblur("validate(\"email\")")
      • If using double quotes for attributes: onblur("validate('email')")
      Overrides:
      onblur in class HtmlElementVoid
      Returns:
      This object.
    • oncancel

      public Input oncancel(String value)
      Description copied from class: HtmlElement
      oncancel attribute.

      Event handler for when a dialog is cancelled.

      Overrides:
      oncancel in class HtmlElementVoid
      Returns:
      This object.
    • oncanplay

      public Input oncanplay(String value)
      Description copied from class: HtmlElement
      oncanplay attribute.

      Event handler for when the media can start playing (enough data has been buffered).

      Overrides:
      oncanplay in class HtmlElementVoid
      Returns:
      This object.
    • oncanplaythrough

      public Input oncanplaythrough(String value)
      Description copied from class: HtmlElement
      oncanplaythrough attribute.

      Event handler for when the media can play through to the end without buffering.

      Overrides:
      oncanplaythrough in class HtmlElementVoid
      Returns:
      This object.
    • onchange

      public Input onchange(String value)
      Description copied from class: HtmlElement
      onchange attribute.

      Event handler for when the value of a form element changes and loses focus.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onchange("validate(\"field\")")
      • If using double quotes for attributes: onchange("validate('field')")
      Overrides:
      onchange in class HtmlElementVoid
      Returns:
      This object.
    • onclick

      public Input onclick(String value)
      Description copied from class: HtmlElement
      onclick attribute.

      Event handler for when the element is clicked.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onclick("alert(\"Hello\")")
      • If using double quotes for attributes: onclick("alert('Hello')")
      Overrides:
      onclick in class HtmlElementVoid
      Returns:
      This object.
    • oncuechange

      public Input oncuechange(String value)
      Description copied from class: HtmlElement
      oncuechange attribute.

      Event handler for when a text track cue changes.

      Overrides:
      oncuechange in class HtmlElementVoid
      Returns:
      This object.
    • ondblclick

      public Input ondblclick(String value)
      Description copied from class: HtmlElement
      ondblclick attribute.

      Event handler for when the element is double-clicked.

      Overrides:
      ondblclick in class HtmlElementVoid
      Returns:
      This object.
    • ondurationchange

      public Input ondurationchange(String value)
      Description copied from class: HtmlElement
      ondurationchange attribute.

      Event handler for when the duration of the media changes.

      Overrides:
      ondurationchange in class HtmlElementVoid
      Returns:
      This object.
    • onemptied

      public Input onemptied(String value)
      Description copied from class: HtmlElement
      onemptied attribute.

      Event handler for when the media element becomes empty (e.g., network error).

      Overrides:
      onemptied in class HtmlElementVoid
      Returns:
      This object.
    • onended

      public Input onended(String value)
      Description copied from class: HtmlElement
      onended attribute.

      Event handler for when the media playback reaches the end.

      Overrides:
      onended in class HtmlElementVoid
      Returns:
      This object.
    • onerror

      public Input onerror(String value)
      Description copied from class: HtmlElement
      onerror attribute.

      Event handler for when an error occurs (e.g., failed resource loading).

      Overrides:
      onerror in class HtmlElementVoid
      Returns:
      This object.
    • onfocus

      public Input onfocus(String value)
      Description copied from class: HtmlElement
      onfocus attribute.

      Event handler for when the element receives focus.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onfocus("highlight(\"field\")")
      • If using double quotes for attributes: onfocus("highlight('field')")
      Overrides:
      onfocus in class HtmlElementVoid
      Returns:
      This object.
    • oninput

      public Input oninput(String value)
      Description copied from class: HtmlElement
      oninput attribute.

      Event handler for when the value of an input element changes (fires on every keystroke).

      Overrides:
      oninput in class HtmlElementVoid
      Returns:
      This object.
    • oninvalid

      public Input oninvalid(String value)
      Description copied from class: HtmlElement
      oninvalid attribute.

      Event handler for when form validation fails.

      Overrides:
      oninvalid in class HtmlElementVoid
      Returns:
      This object.
    • onkeydown

      public Input onkeydown(String value)
      Description copied from class: HtmlElement
      onkeydown attribute.

      Event handler for when a key is pressed down.

      Overrides:
      onkeydown in class HtmlElementVoid
      Returns:
      This object.
    • onkeypress

      public Input onkeypress(String value)
      Description copied from class: HtmlElement
      onkeypress attribute.

      Event handler for when a key is pressed (deprecated, use onkeydown instead).

      Overrides:
      onkeypress in class HtmlElementVoid
      Returns:
      This object.
    • onkeyup

      public Input onkeyup(String value)
      Description copied from class: HtmlElement
      onkeyup attribute.

      Event handler for when a key is released.

      Overrides:
      onkeyup in class HtmlElementVoid
      Returns:
      This object.
    • onload

      public Input onload(String value)
      Description copied from class: HtmlElement
      onload attribute.

      Event handler for when the element and its resources have finished loading.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onload("init(\"config\")")
      • If using double quotes for attributes: onload("init('config')")
      Overrides:
      onload in class HtmlElementVoid
      Returns:
      This object.
    • onloadeddata

      public Input onloadeddata(String value)
      Description copied from class: HtmlElement
      onloadeddata attribute.

      Event handler for when the first frame of media has finished loading.

      Overrides:
      onloadeddata in class HtmlElementVoid
      Returns:
      This object.
    • onloadedmetadata

      public Input onloadedmetadata(String value)
      Description copied from class: HtmlElement
      onloadedmetadata attribute.

      Event handler for when metadata (duration, dimensions, etc.) has been loaded.

      Overrides:
      onloadedmetadata in class HtmlElementVoid
      Returns:
      This object.
    • onloadstart

      public Input onloadstart(String value)
      Description copied from class: HtmlElement
      onloadstart attribute.

      Event handler for when the browser starts loading the media.

      Overrides:
      onloadstart in class HtmlElementVoid
      Returns:
      This object.
    • onmousedown

      public Input onmousedown(String value)
      Description copied from class: HtmlElement
      onmousedown attribute.

      Event handler for when a mouse button is pressed down on the element.

      Overrides:
      onmousedown in class HtmlElementVoid
      Returns:
      This object.
    • onmouseenter

      public Input onmouseenter(String value)
      Description copied from class: HtmlElement
      onmouseenter attribute.

      Event handler for when the mouse pointer enters the element (does not bubble).

      Overrides:
      onmouseenter in class HtmlElementVoid
      Returns:
      This object.
    • onmouseleave

      public Input onmouseleave(String value)
      Description copied from class: HtmlElement
      onmouseleave attribute.

      Event handler for when the mouse pointer leaves the element (does not bubble).

      Overrides:
      onmouseleave in class HtmlElementVoid
      Returns:
      This object.
    • onmousemove

      public Input onmousemove(String value)
      Description copied from class: HtmlElement
      onmousemove attribute.

      Event handler for when the mouse pointer moves over the element.

      Overrides:
      onmousemove in class HtmlElementVoid
      Returns:
      This object.
    • onmouseout

      public Input onmouseout(String value)
      Description copied from class: HtmlElement
      onmouseout attribute.

      Event handler for when the mouse pointer moves out of the element (bubbles).

      Overrides:
      onmouseout in class HtmlElementVoid
      Returns:
      This object.
    • onmouseover

      public Input onmouseover(String value)
      Description copied from class: HtmlElement
      onmouseover attribute.

      Event handler for when the mouse pointer moves over the element (bubbles).

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onmouseover("showTooltip(\"info\")")
      • If using double quotes for attributes: onmouseover("showTooltip('info')")
      Overrides:
      onmouseover in class HtmlElementVoid
      Returns:
      This object.
    • onmouseup

      public Input onmouseup(String value)
      Description copied from class: HtmlElement
      onmouseup attribute.

      Event handler for when a mouse button is released over the element.

      Overrides:
      onmouseup in class HtmlElementVoid
      Returns:
      This object.
    • onmousewheel

      public Input onmousewheel(String value)
      Description copied from class: HtmlElement
      onmousewheel attribute.

      Event handler for when the mouse wheel is rotated over the element (deprecated, use onwheel).

      Overrides:
      onmousewheel in class HtmlElementVoid
      Returns:
      This object.
    • onpause

      public Input onpause(String value)
      Description copied from class: HtmlElement
      onpause attribute.

      Event handler for when media playback is paused.

      Overrides:
      onpause in class HtmlElementVoid
      Returns:
      This object.
    • onplay

      public Input onplay(String value)
      Description copied from class: HtmlElement
      onplay attribute.

      Event handler for when media playback starts.

      Overrides:
      onplay in class HtmlElementVoid
      Returns:
      This object.
    • onplaying

      public Input onplaying(String value)
      Description copied from class: HtmlElement
      onplaying attribute.

      Event handler for when media playback starts after being paused or delayed.

      Overrides:
      onplaying in class HtmlElementVoid
      Returns:
      This object.
    • onprogress

      public Input onprogress(String value)
      Description copied from class: HtmlElement
      onprogress attribute.

      Event handler for when the browser is downloading media data.

      Overrides:
      onprogress in class HtmlElementVoid
      Returns:
      This object.
    • onratechange

      public Input onratechange(String value)
      Description copied from class: HtmlElement
      onratechange attribute.

      Event handler for when the playback rate of media changes.

      Overrides:
      onratechange in class HtmlElementVoid
      Returns:
      This object.
    • onreset

      public Input onreset(String value)
      Description copied from class: HtmlElement
      onreset attribute.

      Event handler for when a form is reset.

      Overrides:
      onreset in class HtmlElementVoid
      Returns:
      This object.
    • onresize

      public Input onresize(String value)
      Description copied from class: HtmlElement
      onresize attribute.

      Event handler for when the element is resized.

      Overrides:
      onresize in class HtmlElementVoid
      Returns:
      This object.
    • onscroll

      public Input onscroll(String value)
      Description copied from class: HtmlElement
      onscroll attribute.

      Event handler for when the element's scrollbar is scrolled.

      Overrides:
      onscroll in class HtmlElementVoid
      Returns:
      This object.
    • onseeked

      public Input onseeked(String value)
      Description copied from class: HtmlElement
      onseeked attribute.

      Event handler for when a seek operation completes.

      Overrides:
      onseeked in class HtmlElementVoid
      Returns:
      This object.
    • onseeking

      public Input onseeking(String value)
      Description copied from class: HtmlElement
      onseeking attribute.

      Event handler for when a seek operation begins.

      Overrides:
      onseeking in class HtmlElementVoid
      Returns:
      This object.
    • onselect

      public Input onselect(String value)
      Description copied from class: HtmlElement
      onselect attribute.

      Event handler for when text is selected in the element.

      Overrides:
      onselect in class HtmlElementVoid
      Returns:
      This object.
    • onshow

      public Input onshow(String value)
      Description copied from class: HtmlElement
      onshow attribute.

      Event handler for when a context menu is shown.

      Overrides:
      onshow in class HtmlElementVoid
      Returns:
      This object.
    • onstalled

      public Input onstalled(String value)
      Description copied from class: HtmlElement
      onstalled attribute.

      Event handler for when media loading is stalled.

      Overrides:
      onstalled in class HtmlElementVoid
      Returns:
      This object.
    • onsubmit

      public Input onsubmit(String value)
      Description copied from class: HtmlElement
      onsubmit attribute.

      Event handler for when a form is submitted.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onsubmit("return validate(\"form\")")
      • If using double quotes for attributes: onsubmit("return validate('form')")
      Overrides:
      onsubmit in class HtmlElementVoid
      Returns:
      This object.
    • onsuspend

      public Input onsuspend(String value)
      Description copied from class: HtmlElement
      onsuspend attribute.

      Event handler for when media loading is suspended.

      Overrides:
      onsuspend in class HtmlElementVoid
      Returns:
      This object.
    • ontimeupdate

      public Input ontimeupdate(String value)
      Description copied from class: HtmlElement
      ontimeupdate attribute.

      Event handler for when the current playback position changes.

      Overrides:
      ontimeupdate in class HtmlElementVoid
      Returns:
      This object.
    • ontoggle

      public Input ontoggle(String value)
      Description copied from class: HtmlElement
      ontoggle attribute.

      Event handler for when a details element is opened or closed.

      Overrides:
      ontoggle in class HtmlElementVoid
      Returns:
      This object.
    • onvolumechange

      public Input onvolumechange(String value)
      Description copied from class: HtmlElement
      onvolumechange attribute.

      Event handler for when the volume of media changes.

      Overrides:
      onvolumechange in class HtmlElementVoid
      Returns:
      This object.
    • onwaiting

      public Input onwaiting(String value)
      Description copied from class: HtmlElement
      onwaiting attribute.

      Event handler for when media playback stops to buffer more data.

      Overrides:
      onwaiting in class HtmlElementVoid
      Returns:
      This object.
    • spellcheck

      public Input spellcheck(Object value)
      Description copied from class: HtmlElement
      spellcheck attribute.

      Indicates whether the element should have its spelling and grammar checked.

      Possible values:

      • "true" - Enable spell checking for this element
      • "false" - Disable spell checking for this element
      Overrides:
      spellcheck in class HtmlElementVoid
      Returns:
      This object.
    • style

      public Input style(String value)
      Description copied from class: HtmlElement
      style attribute.

      Specifies inline CSS styles for the element. The value should be valid CSS property-value pairs separated by semicolons.

      Overrides:
      style in class HtmlElementVoid
      Returns:
      This object.
    • tabindex

      public Input tabindex(Object value)
      Description copied from class: HtmlElement
      tabindex attribute.

      Specifies the tab order of the element when navigating with the keyboard.

      Possible values:

      • Positive integer - Element is focusable and participates in tab order
      • "0" - Element is focusable but not in tab order
      • Negative integer - Element is not focusable
      Overrides:
      tabindex in class HtmlElementVoid
      Returns:
      This object.
    • title

      public Input title(String value)
      Description copied from class: HtmlElement
      title attribute.

      Specifies additional information about the element, typically displayed as a tooltip when the user hovers over the element.

      Overrides:
      title in class HtmlElementVoid
      Returns:
      This object.
    • translate

      public Input translate(Object value)
      Description copied from class: HtmlElement
      translate attribute.

      Specifies whether the element's content should be translated when the page is localized.

      Possible values:

      • "yes" - Content should be translated (default)
      • "no" - Content should not be translated
      Overrides:
      translate in class HtmlElementVoid
      Returns:
      This object.