开发者

Passing Value to Javascript function via Android Menu

I have a WebView and the it loads a html page which has javascript function in it. The WebView has some Menu's namely, edit, refresh, next & previou开发者_StackOverflow中文版s. When i press Edit, i want the javascript to do what it has to?. When i press edit, the JS function has to show checkbox. I am not being able to pass the value to the html page. Any help will be appreciated.


your question is not clear. You want to check a checkbox in an HTML-page after you press the edit button in an android menu? use addJavascriptInterface to pass values from javascript to java: http://developer.android.com/guide/webapps/webview.html

or just use webview.loadUrl("Javascript:...") to let javascript do something.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜