开发者

Passing Value to Javascript function via Android Menu

开发者 https://www.devze.com 2023-04-08 05:05 出处:网络
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.

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

精彩评论

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