HTML <input> dirname属性

❮HTML<input>タグ

フィールドのテキストの方向が送信されるHTMLフォーム:

<form action="/action_page.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname" dirname="fname.dir">
  <input type="submit" value="Submit">
</form>

定義と使用法

このdirname属性により、入力フィールドのテキスト方向の送信が可能になります

属性のdirname値は常に入力フィールドの名前であり、その後に「.dir」が続きます。


ブラウザのサポート

表の数字は、属性を完全にサポートする最初のブラウザーバージョンを示しています。

Attribute
dirname Yes 79.0 Not supported Yes Yes

構文

<input name="myname" dirname="myname.dir">

属性値

Value Description
name.dir Specifies that the text direction of the input field will be submitted.

❮HTML<input>タグ