Does Android support click events in its WebView?

给你一囗甜甜゛ 提交于 2019-12-11 07:32:50

问题


I'm using PhoneGap and Sencha Touch to display a form. I'm using an image as the button to submit it:

<img id='submit' src='button.png' />

I'd like to then listen to it be clicked and validate the form. If I try the following it never seems to fire:

Ext.get('submit').on('click', validateFn);

Am I missing something obvious? Should I use <input type="image" ... />?

Update: For future viewers of this question it is worth noting that inconsistent click handling seems to be a bug or series of bugs in Android's WebView. There are several unresolved bugs on this topic.


回答1:


Yes it do accept click events

Check this link and sample out

http://developer.android.com/resources/articles/using-webviews.html



来源:https://stackoverflow.com/questions/4123593/does-android-support-click-events-in-its-webview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!