HTML DOM Input Submit 对象
Input Submit 对象
Input Submit 对象表示一个 type="submit" 的 HTML <input> 元素。
访问 Input Submit 对象
您可以使用 getElementById() 访问 type="submit" 的 <input> 元素。
提示:您还可以通过遍历表单的 elements 集合来访问 <input type="submit">。
创建 Input Submit 对象
您可以使用 document.createElement() 方法创建 type="submit" 的 <input> 元素。
Input Submit 对象属性
属性 | 描述 |
---|---|
autofocus | 设置或返回当页面加载时,提交按钮是否应自动获得焦点 |
defaultValue | 设置或返回提交按钮的默认值 |
disabled | 设置或返回提交按钮是否被禁用 |
form | 返回包含提交按钮的表单的引用 |
formAction | 设置或返回提交按钮的 formaction 属性值 |
formEnctype | 设置或返回提交按钮的 formenctype 属性值 |
formMethod | 设置或返回提交按钮的 formmethod 属性值 |
formNoValidate | 设置或返回提交时是否应验证表单数据 |
formTarget | 设置或返回提交按钮的 formtarget 属性值 |
name | 设置或返回提交按钮的 name 属性值 |
type | 返回提交按钮所属的表单元素类型 |
value | 设置或返回提交按钮的 value 属性值 |
标准属性和事件
Input Submit 对象还支持标准的 属性 和 事件。
相关页面
HTML 教程:HTML 表单
HTML 参考:HTML <input> 标签
HTML 参考:HTML <input> type 属性