案例:html/html5 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<form action="demo_form.aspx">
6
  <input type="file" name="pic" accept="image/*">
7
  <input type="submit">
8
</form>
9
10
<p><strong>注释:</strong>Internet Explorer 9 以及更早的版本不支持 input 标签的 accept 属性。</p>
11
<p><strong>注释:</strong>鉴于安全考虑,该例不允许您上传文件。</p>
12
13
</body>
14
</html>