【问题标题】:Take a picture button in html 5html 5中的拍照按钮
【发布时间】:2014-01-13 19:55:43
【问题描述】:

如何使用 html 5 制作“拍照”按钮? 我知道通过添加一个

<input type="file" /> 

Android 设备会要求用户选择来源... 来源之一是相机。

但在 iphone 设备中,它会打开图库以选择用户想要上传的图片。

是否可以创建一个可以在两个设备上打开相机的按钮? (Windows 手机呢?)

我正在寻找一种可以利用任何 html 移动框架的解决方案,例如 phonegap、cordova 等...

【问题讨论】:

    标签: android iphone html cordova android-camera


    【解决方案1】:

    不这么认为。但是这种格式看起来很适合拍照。

    html

    <h4>Take a Picture</h4>
    <form id="form1" name="form1" enctype="multipart/form-data">
           <input type="file" id="file1"  name="file1" accept="image/*" capture="camera">
           <input type="file" id="file2"  name="file2" accept="image/*" capture="camera">
           <input type="button" value="Save" onclick="sendFile();" />
    </form>
    

    IOS

    【讨论】:

    • 这项工作在 Androd 7,8 但新的 Android 9 不起作用。
    猜你喜欢
    • 1970-01-01
    • 2012-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多