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>   多选
扫码体验

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM