English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The dirname attribute enables the submission of the text direction of the input fields. The value of the dirname attribute is always the name of the input field followed by “.dir”.
HTML form, the text direction of the fields to be submitted in this form (the text direction of the input fields will also be submitted when the form is submitted):
<!DOCTYPE html> <html> <head> <title>HTML: <input> dirname attribute - 基础教程网(oldtoolbag.com)</title> <body> <form action="action_page.php"> First name: <input type="text" name="fname" dirname="fname.dir"> <input type="submit" value="Submit"> </form> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
Internet Explorer and Safari do not support the dirname attribute.
The dirname attribute enables the submission of the text direction of the input field.
The value of the dirname attribute is always the name of the input field followed by " .dir".
The dirname attribute is an HTML5New features added.
<input name="myname" dirname="myname.dir">
Value | Description |
---|---|
name.dir | The text direction of the specified input field will be submitted. |