WebView webView = (WebView)findViewById(R.id.display);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
String path="file:///android_asset/";
String js = "<html><head>"
+ "<link rel='stylesheet' href='"+path+"jqmath-0.4.3.css'>"
+ "<script src='"+path+"jquery-1.4.3.min.js'></script>"
+ "<script src='"+path+"jqmath-etc-0.4.5.min.js'></script>"
+ "</head><body>"
+ "$$x={-b±√{b^2-4ac}}/{2a}$$</body></html>";
webView.loadDataWithBaseURL("file:///android_asset/" ,js, "text/html", "UTF-8", null);
我說的一切,我從here的資產文件夾中下載的文件,但我得到的,當我運行的應用程序是$$x={-b±√{b^2-4ac}}/{2a}$$
,而不是預期方程。有什麼我缺少的。jqMath不顯示公式