TypeError: matchExpr[type].exec is not a function
遇到了这个问题,很久没找到答案,后来使用了万能的google,貌似也没找到答案.
详细描述下:
通过使用 $(".select")来选择jqeury对象,没问题.
通过$(".select").find(".ccc") 也没问题
通过$(".select").find(".ccc div") 或者 $("select").find("div.ccc") 问题来了,不能通过find来找target.
国内搜索引擎没找到相关解决方法,只能去试试google了,运气好,google还真打开了.
但同样没找到解决方案.
看了别人在jquery对这个报错的的反馈,如下:
<!DOCTYPE html>
<html> <body>
<input type='button' name='btn' value='click'/> <script>
Object.prototype.toQueryString = function () {}
</script> <script src='jquery-1.10.2.js' type='text/javascript'></script>
<script> $("[name='btn']"); </script> </body>
</html>
发现了一些共同之处:在Object的原型上扩展自己的方法.
我就尝试去把自己代码里的object扩展给删了试试,果然可以了.
其实不用扩展也没问题的,可以用全局方法或者工厂方法代替的.
TypeError: matchExpr[type].exec is not a function的更多相关文章
- js Object扩展自定义方法,jQuery抛出 Uncaught TypeError: matchExpr[type].exec is not a function
使用Jquery的时候,想在Object原型上添加自己扩展的方法的时候,启动项目之后,打开网页就会报如上错误信息,经过测试,可以在Object下的具体类型上进行扩展自定义方法,如String,Arra ...
- JQuery中button提交表单报TypeError: elem[type] is not a function jquery
错误: TypeError: elem[type] is not a function jquery 解决: 出现这种现象的原因是,提交的表单中,有标签的name,有以submit命名的 name中不 ...
- Uncaught TypeError: _react2.default.findDOMNode is not a function
react 查找某节点时报错 Uncaught TypeError: _react2.default.findDOMNode is not a function 代码: import React, { ...
- TypeError: document.formname.submit is not a function
<form name="formname" ...> .... <input name="submit" type="submit& ...
- Error in mounted hook: "TypeError: handlers[i].call is not a function" 原因
Error in mounted hook: "TypeError: handlers[i].call is not a function" 百度翻译 安装钩子中的错误:" ...
- python set add 导致问题 TypeError: unhashable type: 'list'
问题复现 >>> a = set() >>> b = set() >>> b.add(1) >>> a.add(b) Trace ...
- 诡异错误二:TypeError: data type not understood
如何使用Python产生一个数组,数组的长度为1024,数组的元素全为0? 很简单啊, 使用zeros(1024) 即可实现! 如何产生一个2×1024的全0矩阵呢?是否是zeros(2,1024) ...
- TypeError:_12.store.query is not a function
1.错误描述 TypeError:_12.store.query is not a function _SearchMixin.js(第62行 ...
- d3.svg.line()错误:TypeError: d3.svg.line is not a function
var line_generator= d3.svg.line() .x(function (d,i) { return i; }) .y(function (d) { return d; }) 错误 ...
随机推荐
- Altium Designer PCB双面板制作打印操作步骤
Altium Designer PCB双面板制作打印操作步骤百度知道:http://jingyan.baidu.com/article/335530da83441c19cb41c3db.html?st ...
- 查看linux中某个端口是否被占用
1.netstat -tunlp | grep **** -t--tcp -u--udp -l--listening -n --numeric -p--program -a--all 2.lsof ...
- HDU 1285 确定比赛名次 拓扑排序模板题
http://acm.hdu.edu.cn/showproblem.php?pid=1285 #include <cstdio> #include <cstdlib> #inc ...
- Java调用第三方dll文件的使用方法 System.load()或System.loadLibrary()
Java调用第三方dll文件的使用方法 public class OtherAdapter { static { //System.loadLibrary("Connector") ...
- 解决UBUNTU update KEY错误的问题
114down voteaccepted Run the following in your terminal, sudo apt-key adv --keyserver keyserver.ubun ...
- Android的post()方法究竟运行在哪个线程中
Android中我们常用的post()方法大致有两种情况: 1.如果post方法是handler的,则Runnable执行在handler依附线程中,可能是主线程,也可能是其他线程 2.如果post方 ...
- C# Acrobat打开pdf出错,提示Acrobat.AcroPDDocClass不能强制转换为Acrobat.CAcroPDDoc,使用com组件{9B4CD3E7-4981-101B-9CA8-9240CE2738AE},HRESULT: 0x80004002
要批量将PDF文件内容按页转换为图片,在写的过程过程遇到两个问题. 一,下载的SDK中,提示要引用COM组件Acrobat,但在我的电脑上就是看不到,只能看到Adobe Acrobat 7.0 Bro ...
- 论人品 | | noip1015模拟考
第一题:火车进站... 由于有了老师给的助攻,第一题的时间为半小时,主要在读题了.... jzoj1146 第二题:car 难在正方形的计算? 第二题时间:1.5hour 第三题:sort排序?
- ue4 重新生成ide project文件的命令行
有时候换了机器,工程文件没了,通常是在编辑器里有个菜单项可以生成 但是有时编辑器自身都编不过,没法运行 这时需要调试代码,可以用命令行生成相应的工程文件: ../UnrealEngine/Genera ...
- c# 导出数据到Excel模板
最近在做一个发邮件的功能,客户要求需要导出一个Excel附件,并给了附件的格式, eg: Last Name 姓 First Name 名 Chinese Characters汉字书写(仅大陆人填写) ...