摘要: Android中 WebView控件支持JS与本地代码的交互。// 是否允许在webview中执行javascriptwebSettings.setJavaScriptEnabled(true);//添加JS的接口名称mWebView.addJavascriptInterface(this, "mobiletojs"); 其主要分为两类: 1:JS调用本地代码 通过window.mobiletojs.saveLogin(username, password); mobiletojs 对应mWebView.addJavascriptInterface(this, " 阅读全文
posted @ 2014-02-19 16:50 whroid 阅读(644) 评论(0) 推荐(0)