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; }) 错误 ...
随机推荐
- 初学c# -- 学习笔记(四)
想想,数据库先用mysql了,这玩意小且安装方便.前面web学了些,现在学winform的.数据库先看看便捷的mysql. 下载了一个mysql5.7版的,装上居然找不到密码,重装3.4回,找不到,说 ...
- ajax请求封装
var xmlHttp; var ajaxRequest = function (params) { xmlHttp ={}; this.url = params.url; this.method = ...
- C++STL学习笔记_(1)deque双端数组知识
#include<iostream> using namespace std; #include "deque" #include "algorithm&qu ...
- db2 常用命令
db2osconf 检查系统内核参数 db2pd 监控检查数据库工具,可以检查数据库的许多信息(锁.交易.表空间. SQL等) db2expln 查看程序包的执行计划 db2exfmt 格式化expl ...
- PTA Insert or Merge
According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and gr ...
- include,import,@class的区别
1.#include与#import功能一样,都是导入头文件 2.区别是#include是单纯导入头文件,如果重复导入头文件,头文件就被导入多分 3.#import在导入头文件之前会检查之前是否导入过 ...
- Python:线程
Python中创建线程有两种方式:函数或者用类来创建线程对象. 函数式:调用 _thread 模块中的start_new_thread()函数来产生新线程. 类:创建threading.Thread的 ...
- MongoDB的C#官方驱动InvalidOperationException异常的解决办法
异常情况描述 有一个“文章”类,其中包含一个“List<段落>”类型的属性,“段落”类是抽象类,其子类有“副标题段落”.“文本段落”.“图像段落”.“附件段落”.“列表段落”等类型. 将“ ...
- HTTP Client工具类
HTTP Client工具类: import org.apache.http.Header;import org.apache.http.HttpEntity;import org.apache.ht ...
- 记一次PHP7+opcache+zmq出现SIGSEGV 问题的查找(一次不成功的bug查找)
Title: 记一次PHP7+opcache+zmq出现SEGSEGV问题的查找(一次不成功的bug查找) bug来历自述:线上代码PHP环境是5.2,为了提升性能(逼格),于是升级为PHP7并使用 ...