android - 安卓input file 支持拍照上传吗
PHP中文网
PHP中文网 2017-04-17 14:28:36
0
4
630

<p class="am-form-group am-form-file">
<button type="button" class="am-btn am-btn-sm">
选择要上传的图片</button>
<input id="doc-form-file" type="file" accept="image/*" multiple>
</p>
<p id="file-list"></p>

如图是ios的微信浏览操作截图,但是在安卓端貌似只能访问相册,不支持拍照,有大牛给点意见吗

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(4)
PHPzhong

<input id="File2" runat="server" type="file" accept="image/*" capture="camera" style="width:100%" />

Just use this.

Peter_Zhu

No ~ you can only access the photo album, Apple can

黄舟

Input file means using native. So what is this native thing? I call him a shell, various realizations. Native browsers, uc, chrome, browsers under WeChat, etc. are all shells. The implementation of specific shells varies.
In other words, he can take pictures of you or not. You can't control it. Therefore, the shell is generally required to provide the corresponding API for web calls.

大家讲道理

Just add capture="camera"

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!