javascript - 如何使用 js 从 Web 浏览器中捕获图像或选择图像文件
问题描述
我正在尝试捕获图像或将现有图像上传到我的网站,当我从自动选择的笔记本电脑网络摄像头拍摄照片时,我尝试了几种方法,但它们都不起作用,只想选择文件
<input type="file" accept="image/*" capture>
<!-- and this one -->
<input type="file" accept="image/*" capture="camera">
<input type='file' id="imgInp" />
<img id="blah" src="#" alt="your image" />
它们不起作用,我在 google chrome 浏览器中尝试,但什么也没显示?!
解决方案
推荐阅读
- maven - 测试不使用 Maven 运行
- ios - iOS 在随机位置禁用 oneTimeCode 建议
- ios - VStack 不适合 ContentView SwiftUI
- python - python3.6和python3.7中相同请求对tor的状态差异
- c# - 从使用 List() 的另一个属性设置属性值
- python - Text.insert(tk.INSERT ...) 方法在 Python 中无法正常工作
- c# - 用户控件库中的依赖属性始终为空
- ios - 在 iOS 13 和 xcode 11 中,tableview 单元格的“setSelected”方法不返回完美的单元格大小
- python-3.x - 在while循环中打印额外的逗号 - Python
- python - 如何加快python pyinstaller生成的可执行文件的执行过程?