English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
dirname属性启用输入字段的文本方向的提交。dirname属性的值始终是输入字段的名称,后跟“ .dir”。
HTML表单,将在该表单中提交字段的文本方向(提交表单时,还将提交输入字段的文本方向):
<!DOCTYPE html> <html> <head> <title>HTML:<input> dirname 属性 - 基础教程网(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. |