输入 FileUpload 对象表示 type="file" 的 HTML <input> 元素。
您可以使用 getElementById() 访问 type="file" 的 <input> 元素:
提示:您还可以通过搜索来访问 <input type="file">元素表格的集合。
您可以使用 document.createElement() 方法创建 type="file" 的 <input> 元素:
Property | Description |
---|---|
accept | Sets or returns the value of the accept attribute of the file upload button |
autofocus | Sets or returns whether a file upload button should automatically get focus upon page load |
defaultValue | Sets or returns the default value of the file upload button |
disabled | Sets or returns whether the file upload button is disabled, or not |
files | Returns a FileList object that represents the file or files selected with the file upload button |
form | Returns a reference to the form that contains the file upload button |
multiple | Sets or returns whether a user is allowed to select more than one file in the file upload field |
name | Sets or returns the value of the name attribute of the file upload button |
required | Sets or returns whether a file in the file upload field must be selected before submitting a form |
type | Returns which type of form element the file upload button is |
value | Returns the path or the name of the selected file |
HTML 教程:HTML 表单
HTML 参考:HTML <输入> 标签
HTML 参考:HTML <input> 类型属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!