Android Calling JavaScript functions in WebView

前端 未结 7 715
夕颜
夕颜 2020-11-22 04:14

I am trying to call some javascript functions sitting in an html page running inside an android webview. Pretty simple what the code

7条回答
  •  星月不相逢
    2020-11-22 05:03

    I figured out what the issue was : missing quotes in the testEcho() parameter. This is how I got the call to work:

    myWebView.loadUrl("javascript:testEcho('Hello World!')");
    

提交回复
热议问题