Android WebView doesn't load jQuery

前端 未结 8 1587
抹茶落季
抹茶落季 2020-12-14 21:08

I\'m making a webapp and I\'m using jQuery.

I\'ve made a simple android application with a WebView in it, and I load my url: www.mydomain.com

In mydomain.com

8条回答
  •  被撕碎了的回忆
    2020-12-14 21:20

    Correct sequence-

    webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl("file:///android_asset/xxx.html");

    By mistake dont put your invocation sequence go wrong like below

    webview.loadUrl("file:///android_asset/xxx.html"); webview.getSettings().setJavaScriptEnabled(true);

提交回复
热议问题