出现TypeError: 'undefined' is not a function (evaluating '$')错误

今天周天,要加班。来公司后,遇到一个问题,如题,

TypeError: ‘undefined‘ is not a function (evaluating ‘$‘)

然后遇到这个问题,属于js问题,根据以往的经验,首先要看js语法有没有错误,查看了下,没有错误。

最后,就要考虑是不是没有导入jquery包,发现确实没有导入:<script src="${webAppUrl}/common/scripts/jquery.easyui.min.js" type="text/javascript"></script>

这个包,导入之后,完美解决问题~

出现TypeError: 'undefined' is not a function (evaluating '$')错误

时间: 2024-07-28 13:52:44

出现TypeError: 'undefined' is not a function (evaluating '$')错误的相关文章

JS报错 Uncaught TypeError: undefined is not a function,解决

Chrome调试报错:Uncaught TypeError: undefined is not a function,所有的数据都显示不出来 原因正如错误提示:调用了一个没有定义的方法,实际是一个空值调用了一个jq方法,导致报错 ☆解决方法:在调用方法之前判断值是否为空,不为空才调用方法,参考代码如下: if( d!="" && d.gblen()>My.option.colModel[i].len) { hide+=' relative'; d=getShort

window.showModalDialog 在谷歌Uncaught TypeError: undefined is not a function

调用方法的变量未定义 Chrome 37+禁用对showModalDialog的默认支持. if(navigator.userAgent.indexOf("Chrome") >0 ){ var winOption = "height="+height+",width="+width+",top=50,left=50,toolbar=no,location=no,directories=no,status=no,menubar=no

undefined is not a function

具体报错 TypeError: c:\Users\Administrator\WebstormProjects\blogtest\views\index.ejs:1 >> 1| <%- include header %> 2| <form> 3| <div class="input-group"> 4| <input type="text" class="form-control" place

Uncaught TypeError: $(...).tmpl is not a function(…)

当程序报错:Uncaught TypeError: $(...).tmpl is not a function(…) 首先,需要引入juqey和tmpl:http://pan.baidu.com/s/1kVDarK7,密码:rtua 然后,注释掉@Scripts.Render("~/bundles/jquery")

Uncaught TypeError: download is not a function at HTMLAnchorElement.onclick (index.html:25)

前段时间调试html报了这样的一个错误 Uncaught TypeError: download is not a function     at HTMLAnchorElement.onclick (index.html:25) 我的html 代码为 <a href="javascript:void(0)" class="down_btn downloadButton" onclick="download()"></a>

jquery版本更新后无live函数的处理.TypeError: $(...).live is not a function

jquery live函数语法 jquery版本更新, 发现一个问题: jq自带的live没有了.控制台下会有如下的提示:火狐: TypeError: $(...).live is not a function chrome: Uncaught TypeError: Object [object Object] has no method 'live' 网上的一个说法: jQuery 1.9 较之前的版本做了很大的调整,很多函数都不被支持.例如 live(),die(),toggle(),sub

js.live方法无效, 报错:uncaught TypeError: $(...).live is not a function

前段时间在网上COPY了一个js效果,需要引用jQuery 1.9.1.min.js,之前项目中引用的是jQuery 1.5.1.min.js 然后发现代码中一些动态生成的元素有用到 live的方法全部都失效,调试发现Js报错:uncaught TypeError: $(...).live is not a function 网上一查原来是 Query 1.9 比之前的版本做了很大的调整,很多函数都不被支持 live()方法已经失效,需要改成以下方式 $('#id').on("click&quo

浏览器提示Uncaught TypeError: object is not a function XXX onclick

我在做复选框选中的测试时,做了全选和反选的设置,点击后触发onclick事件在javascript里面进行处理. 刚开始一切都正常,可是后来发现javascript里面的函数不能执行了也就是onclick="chooseOther()" 点击后无效,改来改去还是无效. 后来通过浏览器的调试功能(google 按F12),点击后提示|<input type="checkbox" id="chooseOther" name="choo

[Sencha ExtJS] 关于build production后,浏览器运行报错&#39;Uncaught TypeError: c is not a function&#39;

原文:http://blog.csdn.net/lovelyelfpop/article/details/51328783 估计很多人用 ExtJS6 + Sencha Cmd 6 的时候,遇到过一种情况:开发的时候明明正常的,build之后运行就报了下面的错误 Uncaught TypeError: c is not a function 心里一万个草泥马奔腾:What the hell is this?(这TM什么JB玩意?) 其实根本原因是你忘记了requires某个类导致的. 比如你这样