最新的android升级后,jquery.mobile-1.4.5.min.css无法在android webview中工作(Marshmallow)

时间:2015-11-01 09:22:50

标签: android jquery html css webview

我使用JQuery设计了一个网页。我能够在Android Webview中加载页面。页面在设备上正确呈现(Nexus 5)。

最近为Nexus 5更新Android(到Marshmallow)后,我无法在WebView上查看网页。我只是在Webview的中心看到一个小圆圈。

同样适用于运行较旧Android的设备。

调试时我发现删除行后 - “link rel =”stylesheet“href =”http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min。 css“”,页面显示出来。但我需要css文件以正确的方式设计页面。

对此有任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

解决了这个问题。 需要在行之前添加以下行(来自Uncaught SecurityError: Failed to execute 'replaceState' on 'History': cannot be created in a document with origin 'null') - "

public static IEnumerable<int> IndexesOf(string haystack, string needle)
{
       Regex r = new Regex("\\b(" + needle + ")\\b");
       MatchCollection m = r.Matches(haystack);

       return from Match o in m select o.Index;
}