今天才看到这个html5的新属性!觉得很神奇!
官方定义是:
multiple 属性规定输入字段可选择多个值。
如果使用该属性,则字段可接受多个值。
注释:multiple 属性使用欧冠与以下 <input> 类型:email 和 file。
基本用法是这样子的:
<input type="file" multiple="multiple">
这样能一次上传两个文件。
又或者是这样:
<select multiple>
<option>1</option>
<option>2</option>
<select>
这样也能一次选择两个option选项。
记住是长按ctrl的那种多选。
</pre><pre name="code" class="html">
人生第一篇博客,就当给自己记记笔记吧!