Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLInputElement
  4. dirName

HTMLInputElement: dirName property

Baseline 2023
Newly available

Since ⁨August 2023⁩, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

ThedirName property of theHTMLInputElement interface is the directionality of the element and enables the submission of that value. It reflects the value of the<input> element'sdirName attribute. This property can be retrieved or set.

Valid only forhidden,text,search,url,tel, andemail<input> types, thedirname attribute controls how the element's directionality is submitted. When included, the form control will submit with two name/value pairs: the first being thename andvalue, and the second being the value of thedirname attribute as the name, with a value ofltr orrtl as set by the browser.

Value

A string. The direction of the element.

Examples

js
inputElement.dirName = "rtl";

Specifications

Specification
HTML
# dom-input-dirname

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp