HTML5调用手机相机、相册
2021-03-11 本文已影响0人
别来无恙_ly
//调用相机
<input type="file" name="image" accept="image/*" capture="camera" ref="camera">
//调用相册
<input accept="image/*" type="file" ref="file">
不想调按钮样式可以直接隐藏按钮,通过事件调用该API。
//调用相机
<input type="file" name="image" accept="image/*" capture="camera" ref="camera">
//调用相册
<input accept="image/*" type="file" ref="file">
不想调按钮样式可以直接隐藏按钮,通过事件调用该API。