我们利用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>  多选
扫码体验h5调用相机相册

 

相关文章:

  • 2021-11-17
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
相关资源
相似解决方案