问题
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