安卓上

<input type="file" accept="image/*" capture="camera"> //只调用相机
<input type="file" accept="video/*" capture="camcorder">//只调用摄像机
<input type="file" accept="audio/*" capture="microphone">//只调用录音设备

input:file标签还支持一个multiple属性,表示可以支持多选,如:

<input type="file" accept="image/*" multiple>

加上这个multiple后,capture就没啥用了,因为multiple是专门用来支持多选的。

苹果上

全部都是直接调用相机,就是安卓才会有这些花里胡哨的东西


 
                    
            
                

相关文章:

  • 2022-12-23
  • 2021-07-27
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-03-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-11
  • 2022-12-23
  • 2021-04-08
  • 2022-12-23
  • 2021-07-04
相关资源
相似解决方案