h5调用相机相册

我们利用input 输入框 ,把type属性改为file, 然后调用系统默认相机,摄像,系统相册。

accept:表示要打开的文件类型      capture:表示可以捕获到系统默认的设备

 

< input type="file" accept="image/*" capture="camera">  相机
 
< input type="file" accept="video/*" capture="camcorder"> 录像
 
< input type="file" accept="audio/*" capture="microphone"> 录音
 
< input type="file" accept="image/*" multiple>  多选
扫码体验

 

posted @ 2019-08-08 16:33  一粒丶红尘  阅读(3739)  评论(0编辑  收藏  举报