使用input:file標(biāo)簽, 去調(diào)用系統(tǒng)默認(rèn)相機(jī),攝像,錄音功能,有個(gè)capture屬性,直接說(shuō)明需要調(diào)用什么功能
<input?type="file"?accept="image/*"?capture="camera">
<input?type="file"?accept="video/*"?capture="camcorder">
<input?type="file"?accept="audio/*"?capture="microphone">
capture表示,可以捕獲到系統(tǒng)默認(rèn)的設(shè)備,比如:camera--照相機(jī);camcorder--攝像機(jī);microphone--錄音。
accept表示,直接打開(kāi)系統(tǒng)文件目錄。

input:file標(biāo)簽還支持一個(gè)multiple屬性,表示可以支持多選,如:
<input?type="file"?accept="image/*"?multiple>