input type=‘file’方法


使用input:file標簽, 去調用系統默認相機,攝像,錄音功能,使用capture屬性,直接說明需要調用什么功能

<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--錄音。

accept表示,直接打開系統文件目錄。

轉載:SoftBlue的博客


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM