Call javascript function in Android WebView

后端 未结 3 491
一整个雨季
一整个雨季 2020-12-31 08:58

I have an activity with WebView and Button on it. Android sdk 17. Website isn\'t mine, so I can\'t change it anyway. I need to do js code by android button click.

I\

3条回答
  •  误落风尘
    2020-12-31 09:11

    Change your line with this..

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

    try this one might be helpful to you...

提交回复
热议问题