Firefox Tomorrow

web api instance property

HTMLInputElement: dirName property

View on MDN ↗

The dirName property of the HTMLInputElement interface is the directionality of the element and enables the submission of that value. It reflects the value of the <input> element’s dirName attribute. This property can be retrieved or set.

Valid only for hidden, text, search, url, tel, and email <input> types, the dirname attribute controls how the element’s directionality is submitted. When included, the form control will submit with two name/value pairs: the first being the name and value, and the second being the value of the dirname attribute as the name, with a value of ltr or rtl as set by the browser.

Value

A string. The direction of the element.

Examples

inputElement.dirName = "rtl";

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also