javascript - Set html text field value from java interface android -
I'm working on a project where I have to set values in HTML form fields of your Java method. When the form loads in this app, I have to fill in the text field value on the user's speech. So how can I do this via the Javascript interface in Android? Thank you
The main Gtividhikjawa
WebView.loadUrl ("Your URL"); WebViewksetWebViewClient (new WebViewClient () {@Override public void onPageFinished (webview scene, String url) {webView.loadUrl ( "javascript: setTextField (" + value + ")"}} @ Override public boolean Chahiaovrraiduarelloding (Vebviv view, string URL) {view.loadUrl (url); right back;}});
HtmlFile.html
& lt ; script & gt; function setTextField (value) value = value {document.getElementById ( "texta").;} & Lt; / script & gt;
Comments
Post a Comment