“未捕获的ReferenceError:jQuery未定义”Android铬

时间:2014-03-09 10:42:09

标签: javascript android jquery wordpress chromium

我的应用程序中的Jquery运行不正常!!

webView.loadData(String.format(htmlText, post.getContent()), "text/html", null);

String str = "";

str = "<link rel='stylesheet' href='http://mysite.it/wp-content/plugins/scrollblog/js/couraselcss.css' />" +
        "<script type='text/javascript'>" +
        "<script src='http://code.jquery.com/jquery-1.9.0.min.js'></script>" +
      "<script src='http://mysite.it/wp-content/plugins/scrollblog/js/jquery.touchcarousel-1.1.min.js'></script>" +

在日志中:

I / chromium(31613):[INFO:CONSOLE(3)]“未捕获的ReferenceError:未定义jQuery”,来源:http://mysite.it/wp-content/themes/tiny-forge/customSelect/script2.js(3)

为什么?

1 个答案:

答案 0 :(得分:0)

如果你查看字符串连接内部,它可能会得到答案。您在第二行中缺少结束</script>标记。用以下内容替换它,事情可能会起作用。

str = "<link rel='stylesheet' href='http://mysite.it/wp-content/plugins/scrollblog/js/couraselcss.css' />" +
      "<script type='text/javascript'></script>" +
      "<script src='http://code.jquery.com/jquery-1.9.0.min.js'></script>" +
      "<script src='http://mysite.it/wp-content/plugins/scrollblog/js/jquery.touchcarousel-1.1.min.js'></script>" +