Android WebView + AJAX local files

后端 未结 2 1119
灰色年华
灰色年华 2020-12-30 08:15

I have an android webview loading a website that I have locally in my assets. I\'ve not built it myself, and I have very little control over the markup, js etc.

Pro

2条回答
  •  执笔经年
    2020-12-30 08:56

    You need to allow crossdomain. In this example, crossdomain is allowed for json values and for scripts.

    $.ajaxPrefilter( "json script", function( options ) {
        options.crossDomain = true;
    });
    

提交回复
热议问题