在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