您好,欢迎访问一九零五行业门户网

javascript - 混合式开发中表单input file不生效(在安卓端)

混合式开发后端用php,在前台页面中加了,能显示,但无法选择文件,这个功能是想上传图片,并返回数据的。
回复内容: 混合式开发后端用php,在前台页面中加了,能显示,但无法选择文件,这个功能是想上传图片,并返回数据的。
你用的什么浏览器,这个应该是可以的
重写webchromeclient,里面增加一个方法就可以了:
public void openfilechooser(valuecallback uploadmsg, string accepttype, string capture)
{ muploadmessage = uploadmsg; intent intent = new intent(intent.action_get_content); intent.addcategory(intent.category_openable); intent.settype(image/*); startactivityforresult(intent.createchooser(intent, 选择图片), filechooser_resultcode); }
直接调用相机
调用相机 图片或者相册
其它类似信息

推荐信息