我加載了一個簡單的html文件,它使用html5和jQuery手機,該頁面在PC瀏覽器上工作正常,但是當我把它放在我的android應用程序的資產文件夾中並將其加載到WebView jQuery移動標籤不工作如數據角色,彈出窗口等Android沒有拿起jQuery Mobile
這裏是我的android活動代碼
WebView index = (WebView) findViewById(R.id.webView1);
index.loadUrl("file:///android_asset/index.html");
,這裏是html頁面
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="js\jquery.mobile-1.4.2\jquery.mobile-1.4.2.min.css">
<script src="js\jquery.mobile-1.4.2\jquery.mobile-1.4.2.js"></script>
<script src="js\jquery.mobile-1.4.2\jquery.js"></script>
<script src="js\jquery.mobile-1.4.2\jquery.mobile-1.4.2.min.js"></script>
</head>
HTML文件的head標籤在資源文件夾和jQuery Mobile文件的根源是assets/jquery.mobile-1.4.2
文件夾
你使用phonegap或科爾多瓦這樣做 – Ricky
不,我沒有使用PhoneGap或科爾多瓦。 。 –
如果不是那麼你想要在您的活動頁面啓用JavaScript – Ricky