[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 ...
随机推荐
- yii2中表单的字段标签名称
1.以登陆页面为例,默认是英文的,在loginForm.php中添加attributeLabels,可以变成中文 具体代码如下: public function attributeLabels(){ ...
- angularjs 相关资料
1.angularjs 框架结构 bootstrap process :http://www.oschina.net/translate/angularjs-the-next-big-thing?pr ...
- 关于IE6/7的 inline-block
今天在写代码的时候使用了inline-block,但是很意外的在IE6/7下此属性不给力~~ 但是由于我既需要他是个内联数据,又要设置它的宽度设置block,所以只能使用inline-block. 所 ...
- UINavigationController详解三(转)ToolBar
原文出自:http://blog.csdn.net/totogo2010/article/details/7682641,特别感谢. 1.显示Toolbar 在RootViewController. ...
- JSP01
<%@page pageEncoding="UTF-8" //page:设置此文件的编码 contentType="text/html;charset=utf ...
- oracle sql语言模糊查询--通配符like的使用教程
转自:http://www.cnblogs.com/tyler2000/archive/2011/04/28/oracleSql.html oracle在Where子句中,可以对datetime.ch ...
- DLL:加载错误
一:试图加载格式不正确的程序 把目标平台Any CPU 设置为X86:
- 如何为github上的项目添加gif效果图
一.制作gif图片 如何制作可以参考: http://www.jianshu.com/p/27ec6375b8ab?utm_campaign=maleskine&utm_content=not ...
- Java实现批量修改文件名称
import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; /** ...
- 【转】Eclipse Console 加大显示的行数,禁止弹出
转载地址:http://blog.csdn.net/leidengyan/article/details/5686691 Eclipse Console 加大显示的行数: 在 Preferences- ...