[dataTables.js error] Uncaught TypeError: myTable.row is not a function
使用dataTables.js时遇到的问题。
代码如下:
var myTable = $('#dynamic-table')
.dataTable({
bAutoWidth : false,
"aoColumns" : [ {
"bSortable" : false
}, null, null, null ],
"aaSorting" : [],
});
$('#dynamic-table tbody').on( 'click', 'input', function () {
var data = myTable.row( this ).data();
});
解决办法一:
修改第2行的创建接口,修改后的代码如下:
2 .DataTable({
解决办法二:
修改第11行的调用接口,修改后的代码如下:
11 var data = myTable.api().row( this ).data();
以上方法二选一即可。
[dataTables.js error] Uncaught TypeError: myTable.row is not a function的更多相关文章
- jquery.js 3.0报错, Uncaught TypeError: url.indexOf is not a function
转载自:http://majing.io/questions/432 问题描述 jQuery升级到3.0.0后类型错误 jquery.js:9612 Uncaught TypeError: url ...
- jQuery-2.1.4.min.js:4 Uncaught TypeError: Illegal invocation
jQuery-2.1.4.min.js:4 Uncaught TypeError: Illegal invocation 此错误与crsf有关
- index.js:13 Uncaught TypeError: Cannot read property 'split' of undefined
使用 webpack 编译 Vue 项目时出现报错: index.js:13 Uncaught TypeError: Cannot read property 'split' of undefined ...
- 【jQuery】jquery中 使用$('#parentUid').attr(parentUid);报错jquery-1.11.3.min.js:5 Uncaught TypeError: Cannot read property 'nodeType' of undefined
jquery中 使用$('#parentUid').attr(parentUid);报错jquery-1.11.3.min.js:5 Uncaught TypeError: Cannot read p ...
- vue项目报错1 Vue is a constructor and should be called with the `new` keyword && jquery.js?eedf:3850 Uncaught TypeError: this._init is not a function...
Vue is a constructor and should be called with the `new` keyword Uncaught TypeError: this._init is n ...
- 使用zepto中animate报错“Uncaught TypeError: this.bind is not a function”的解决办法
在使用zepto时,我先引入zepto.min.js,然后引入fx.js,但是在使用animate函数时,控制台却报如下错误: Uncaught TypeError: this.bind is not ...
- jQuery3.0+报错Uncaught TypeError: e.indexOf is not a function
jQuery3.0+报错Uncaught TypeError: e.indexOf is not a function 使用.load()绑定事件时报错,Uncaught TypeError: e.i ...
- 简记webpack运行报错 Uncaught TypeError: self.postMessage is not a function
说好2017Fix的还是能重现,可能项目的版本比较旧了,简要记录解决办法 1.错误: index.js?bed3:67 Uncaught TypeError: self.postMessage is ...
- jQuery报错:Uncaught TypeError: _this.attr is not a function
问题:想通过延时把置灰的按钮再次复原,代码如下: $("#sendEmailCode").on("click", function() { var _this ...
随机推荐
- android 百度地图定位开发2
先下载了示例代码 进行配置(可查看开发 指南 Hello BaiDuMap) 第一步:创建并配置工程(具体方法参见工程配置部分的介绍): 第二步:在AndroidManifest中添加开发密钥.所需权 ...
- apache部署django记录
在ubuntu下通过apache部署django 首先需要下载python,django,apache以及wsgi模块 python基本已经自带,我用的是2.7,不是的话可以重新装一个 下载djang ...
- source insight资源
http://www.cnblogs.com/Red_angelX/p/3713935.html https://github.com/redxu/sihook
- 对于改善 MySQL 数据装载操作有效率的方法是怎样
多时候关心的是优化SELECT 查询,因为它们是最常用的查询,而且确定怎样优化它们并不总是直截了当.相对来说,将数据装入数据库是直截了当的.然而,也存在可用来改善数据装载操作效率的策略,其基本原理如下 ...
- 2、HTML
软件的结构: C/S(Client Server)结构的软件: 比如: QQ. 极品飞车. 飞信 . 迅雷 cs结构的软件的缺点:更新的时候需要用户下载更新包然后再安装,程序员则需要开发客户端与服务端 ...
- 使用 Bootstrap Typeahead 组件
Bootstrap 中的 Typeahead 组件就是通常所说的自动完成 AutoComplete,功能很强大,但是,使用上并不太方便.这里我们将介绍一下这个组件的使用. 第一,简单使用 首先,最简单 ...
- 层叠样式表(CSS)
层叠样式表(CSS) CSS(Cascading Style Sheet)中文译为层叠样式表.是用于控制网页样式并允许将样式信息与网页内容分离的一种标记性语言.CSS的引入就是为了使得HTML语言能够 ...
- 优秀的web前端工程师要具备什么
优秀的前端工程师需要具备良好的沟通能力,因为你的工作与很多人的工作息息相关.在任何情况下,前端工程师至少都要满足下列四类客户的需求. 产品经理--这些是负责策划应用程序的一群人.他们能够想象出怎样通过 ...
- 用canvas画时钟
效果图在博客首页上. html: <canvas id="canvas" >Your browser does not support canvas</canva ...
- JavaScript navigator 对象(转)
navigator -- navigator对象通常用于检测浏览器与操作系统的版本 navigator,中文"导航器" 引用网址:http://www.dreamdu.com/ja ...