本文介绍了"未捕获的Ref​​erenceError:jQuery是没有定义" Android的铬的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jQuery的我的应用程序工作不正常!

Jquery in my app not working well!!

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 /铬(31613):[信息:控制台(3)]未捕获的Ref​​erenceError:jQuery是没有定义,来源:的(3)

I/chromium(31613): [INFO:CONSOLE(3)] "Uncaught ReferenceError: jQuery is not defined", source: http://mysite.it/wp-content/themes/tiny-forge/customSelect/script2.js (3)

为什么?

推荐答案

如果你看一下字符串连接里面可能持有的答案,为什么。你缺少一个结束&LT; / SCRIPT&GT; 在第二行标签。用下面的,事情可能只是工作更换。

If you look inside the string concatenation it may hold the answer as to why. You are missing a closing </script> tag in the second line. Replace it with the following and things might just work.

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>" +

这篇关于&QUOT;未捕获的Ref​​erenceError:jQuery是没有定义&QUOT; Android的铬的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 21:24