[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 ...
随机推荐
- mydetails-yii1
1.yii验证码多余的get a new code ,即使在main.php中配置了中文也是出现获取新图片,影响效果 需要把 <?php $this->widget('CCaptcha') ...
- 用jQuery创建HTML中不存在的标签元素碰到的问题
如果你自定义了一个标签,比如<aaa></aaa> 用jQuery的写法,比如var custom_element = $('<aaa class="ee&qu ...
- Jquery 插件库
http://www.jq22.com/ 日期: http://laydate.layui.com/
- 【python cookbook】【字符串与文本】9.将Unicode文本统一表示为规范形式
问题:确保所有的Unicode字符串都拥有相同的底层 解决方案:为解决同一个文本拥有多种不同的表示形式问题,应该先将文本统一表示为规范形式,这可以通过unicodedata模块来完成, unicode ...
- input放在a标签里面不能选择input里面的文本,IE9点击失效
input放在a标签里面不能选择input里面的文本,IE9点击失效 在IE浏览器中<input type="text" value="test" /&g ...
- semantic-ui and IE only message
<![if !IE]> <div class="ui message red"> <i class="close icon"> ...
- 数32位 unsigned int中1的个数
参考文章:http://www.cnblogs.com/graphics/archive/2010/06/21/1752421.html 最简单的方法: int BitCount0(unsigned ...
- Xcode运行的错误bug收集
libopencore-amrnb.a(wrapper.o)' does not contain bitcode. You must rebuild it with bitcode enabled ( ...
- HDU 5025:Saving Tang Monk(BFS + 状压)
http://acm.hdu.edu.cn/showproblem.php?pid=5025 Saving Tang Monk Problem Description <Journey to ...
- hdu4914 Linear recursive sequence
用矩阵求解线性递推式通项 用fft优化矩阵乘法 首先把递推式求解转化为矩阵求幂,再利用特征多项式f(λ)满足f(A) = 0,将矩阵求幂转化为多项式相乘, 最后利用傅里叶变换的高效算法(迭代取代递归) ...