android的webview加载jqm,单 选框 报这个错误 50C

我用android的webview加载jqm,单 选框 报这个错误,复选框,没有问题,哪位高手帮我看一下这个是什么原因呢?

[INFO:CONSOLE(2)] "Uncaught Error: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh'", source: file:///android_asset/js/jquery.min.js (2)

代码如下:
图片说明

android调用代码如下:
wb_content=(WebView) findViewById(R.id.wb_content);
    WebSettings webSettings = wb_content.getSettings();  
    webSettings.setSavePassword(false);  
    webSettings.setSaveFormData(false);  
    webSettings.setJavaScriptEnabled(true);  
    webSettings.setSupportZoom(true);
    // Horizontal水平方向,Vertical竖直方向  
    wb_content.setHorizontalScrollBarEnabled(false);  
    wb_content.setVerticalScrollBarEnabled(false);  

    wb_content.setWebChromeClient(new WebChromeClient() {
        // 处理javascript中的alert
        public boolean onJsAlert(WebView view, String url, String message,final JsResult result) {
            // 构建一个Builder来显示网页中的对话框
            Builder builder = new Builder(ShowProjectActivity.this);
            builder.setTitle("Alert");
            builder.setMessage(message);
            builder.setPositiveButton(android.R.string.ok,
                    new AlertDialog.OnClickListener() {
                        public void onClick(DialogInterface dialog,
                                int which) {
                            // 点击确定按钮之后,继续执行网页中的操作
                            result.confirm();
                        }
                    });
            builder.setCancelable(false);
            builder.create();
            builder.show();
            return true;
        };

        // 处理javascript中的confirm
        public boolean onJsConfirm(WebView view, String url,
                String message, final JsResult result) {
            Builder builder = new Builder(ShowProjectActivity.this);
            builder.setTitle("confirm");
            builder.setMessage(message);
            builder.setPositiveButton(android.R.string.ok,
                    new AlertDialog.OnClickListener() {
                        public void onClick(DialogInterface dialog,
                                int which) {
                            result.confirm();
                        }
                    });
            builder.setNegativeButton(android.R.string.cancel,
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog,
                                int which) {
                            result.cancel();
                        }
                    });
            builder.setCancelable(false);
            builder.create();
            builder.show();
            return true;
        };

        // 设置网页加载的进度条
        public void onProgressChanged(WebView view, int newProgress) {
            ShowProjectActivity.this.getWindow().setFeatureInt(
                    Window.FEATURE_PROGRESS, newProgress * 100);
            super.onProgressChanged(view, newProgress);
        }

        // 设置应用程序的标题title
        public void onReceivedTitle(WebView view, String title) {
            ShowProjectActivity.this.setTitle(title);
            super.onReceivedTitle(view, title);
        }

        public void onReachedMaxAppCacheSize(long spaceNeeded,
                long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) {
            quotaUpdater.updateQuota(spaceNeeded * 2);
        }
    });


    wb_content.loadUrl(url);
    wb_content.addJavascriptInterface(new JavaScriptInterface(), "demo");  
    wb_content.loadUrl("file:///android_asset/22b40f93-e3aa-4e82-ad0d-d8c75d2a7cb6/1111.html");

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问