在iOS6下开发webapp,使用inputz之file,颇有用html5
<
input
type
=
"file"
accept
=
"image/*"
capture
=
"camera"
>
<
input
type
=
"file"
accept
=
"video/*"
capture
=
"camcorder"
>
<
input
type
=
"file"
accept
=
"audio/*"
capture
=
"microphone"
>
|
capture表示,能够捕获到系统默认的设备,好比:camera--照相机;camcorder--摄像机;microphone--录音。web
accept表示,直接打开系统文件目录。app
其实html5的input:file标签还支持一个multiple属性,表示能够支持多选,如:webapp
<
input
type
=
"file"
accept
=
"image/*"
multiple>
|
加上这个multiple后,capture就没啥用了,由于multiple是专门yong用来支持多选的。ide