HTML input maxlength 属性
最大长度为 10 个字符的 <input> 元素: 实例 Run this code » <form action="demo_form.php"> Username: <input type="text" n...
最大长度为 10 个字符的 <input> 元素: 实例 Run this code » <form action="demo_form.php"> Username: <input type="text" n...
min 和 max 属性的使用: 实例 Run this code » <form action="demo_form.html"> Enter a date before 1980-01-01: <input t...
带有 <datalist> 中的预定义值的 <input> 元素: 实例 Run this code » <input list="browsers"> <datalist id="browsers...
定义图片为提交按钮,带有 height 和 width 属性: 实例 Run this code » <form action="demo_form.html"> First name: <input type="text...
带有两个提交按钮的表单,会提交到不同的目标窗口: 实例 Run this code » <form action="demo-form.php"> First name: <input type="text" name="...
带有两个提交按钮的表单(一个进行验证,另一个不进行验证): 实例 Run this code » <form action="demo-form.php"> E-mail: <input type="email" name...
第二个提交按钮覆盖了表单的 HTTP 方法: 实例 Run this code » <form action="demo-form.php" method="get"> First name: <input type="t...
发送默认编码的表单数据(第一个提交按钮),发送编码为 "multipart/form-data" 的表单数据(第二个提交按钮): 实例 Run this code » <form action="demo-post-enctype.p...
带有两个提交按钮的 HTML 表单(不同的 action 值): 实例 Run this code » <form action="demo-form.php"> First name: <input type="text...
位于 form 表单外的输入字段(但仍然属于 form 表单的一部分): 实例 Run this code » <form action="demo-form.php" id="form1"> First name: <i...