在该项目中我使用了jquery.dataTables.js来作为我的前端数据表格。

表格的官网地址:https://www.datatables.net/

一、jsp部分代码片段如下:

 <table id="dynamic-table"
class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th class="center"><label class="pos-rel"> <input
type="checkbox" class="ace" /> <span class="lbl"></span>
</label></th>
<th>文件名称</th>
<th>日期</th>
<th>绝对路径</th>
<th>操作</th>
<!-- <th style="display: none">绝对路径</th> -->
</tr>
</thead> <tbody>
<c:forEach items="${fileList}" var="file">
<tr>
<td class="center"><label class="pos-rel"> <input
type="checkbox" class="ace" /> <span class="lbl"></span>
</label></td>
<td>${file.name }</td>
<td>${file.date }</td>
<td>${file.path }</td>
<td>
<div class="hidden-sm hidden-xs action-buttons">
<a class="red" href="#"> <i
class="ace-icon fa fa-trash-o bigger-130"></i>
</a>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>

二、js代码片段如下:

 var oTable1 = $('#dynamic-table')
.dataTable({
bAutoWidth : false,
"aoColumns" : [ {
"bSortable" : false
}, null, null,null, null, {
"bSortable" : false
} ],
"aaSorting" : [],
});

三、运行的时候收到如下警告信息:

DataTables warning : Requested unknown parameter '' from the data source for row  

四、原因分析

html写了页面有5列数据,而js代码里定义了6列数据。

五、解决办法

在我的环境中,删除js中的一个null列,问题就解决了。

DataTables warning : Requested unknown parameter '5' from the data source for row 0的更多相关文章

  1. DataTables warning : Requested unknown parameter '0' from the data source for row 0错误

    在做datatables的项目,从后台取得数据后,返回给datatables界面时会报下面的错误: DataTables warning : Requested unknown parameter ' ...

  2. DataTables warning requested unknown parameter

    This is possibly the most cryptic warning message that DataTables will show. It is a short error mes ...

  3. Jquery DataTables warning : Requested unknown from the data source for row 0

    昨天在做 Jquery DataTables 的时候,遇到的一个问题,我使用MVC,在tables上加入了一个actionlink的href.但是在运行起来的时候,报错: DataTables war ...

  4. DataTables warning (table id = 'myTable'): Requested unknown parameter '0' from the data source for row 0

    第一种方式:不用在js里设置列Html: <table id="myTable"> <thead> <tr> <th>Title-1 ...

  5. DataTables warning: table id=data-table - Requested unknown parameter '3' for row 0.

    本文为博主原创,未经允许,不得转载: 在使用jquery 的datatable时,报错在页面弹出弹出框,并提示以下内容: DataTables warning: table id=data-table ...

  6. DataTables warning: table id=dataTable - Requested unknown parameter &#39;acceptId&#39; for row 0. For more

    重点内容 DataTables warning: table id=dataTable - Requested unknown parameter 'acceptId' for row 0. For ...

  7. DataTables warning: table id=DataTables_Table_0 - Requested unknown parameter '1' for row 0. For more information about this error, please see http://datatables.net/tn/4

    今天在做后台的时候,考虑到会员模块和订单模块列表显示差不多,于是乎,偷了个懒,把会员列表显示页面的代码拷贝了过来,修改了一下,变成了订单模块.可是,在订单列表显示的时候老是报下面的错误,截图如下: 后 ...

  8. Warning: in_array() expects parameter 2 to be array, string given in D:\wamp\www\suiji.php on line 26

    可参考上篇文章  链接 PHP数组简写模式 同样是PHP版本问题:in_array()函数 第二个参数应该为数组 但是 lnmp下,PHP5.3不报错,wamp下PHP5.5报以下错误: echo & ...

  9. Unknown parameter datatype UNKNOW send from server.

    procedure Tmainform.Button7Click(Sender: TObject); begin kbmMWClientQuery3.Query.Text:='insert into ...

随机推荐

  1. 在linux中的virtualbox无法挂载usb设备的解决方法

    方法来源于网络. 在安装完virtualbox之后,virtualbox会建立一个名为 vboxusers 的组,将你的用户名加入到该组即可. 命令参考: #usermod -a -G vboxuse ...

  2. ANT命令总结(转载)

    1 Ant是什么? Apache Ant 是一个基于 Java的生成工具.生成工具在软件开发中用来将源代码和其他输入文件转换为可执行文件的形式(也有可能转换为可安装的产品映像形式).随着应用程序的生成 ...

  3. Java :List

    1.List是一个接口,不能实例化,需要实例化一个ArrayList或者LinkedListList myList = new ArrayList(); 2.List中可以添加任何对象,包括自己定义的 ...

  4. Linux TTY框架【转】

    本文转载自:http://ju.outofmemory.cn/entry/281168 1. 前言 由于串口的缘故,TTY是Linux系统中最普遍的一类设备,稍微了解Linux系统的同学,对它都不陌生 ...

  5. ES6,ES2105核心功能一览,js新特性详解

    ES6,ES2105核心功能一览,js新特性详解 过去几年 JavaScript 发生了很大的变化.ES6(ECMAScript 6.ES2105)是 JavaScript 语言的新标准,2015 年 ...

  6. Linux和Windows远程桌面互连

    1.Ubuntu 连 windows    W.1 Windows设置允许远程桌面连接    U.1 Ubuntu设置 apt-get install rdesktop    U.2 Ubuntu连接 ...

  7. Maven创建多个子项目

    一.下载jdk并安装:下载apache-maven包,解压到指定目录.(例:D:\Java\apache-maven-3.3.9) 二.配置环境. 1.配置jdk环境 系统变量 (1)JAVA_HOM ...

  8. CSS选择器无法找到td

    .table >  tr > td  <----这样无法找到td 因为table在浏览器下会自动生成tbody,这样即可 .table > tbody > tr > ...

  9. mysql转换引擎的方法

    有很多方法可以将表的存储引擎转换成另外一种引擎,每种方法都各有优缺点: A:alter table 将表从一个引擎直接改为另外一个引擎最简单的办法 alter table tb_name engine ...

  10. [BIM]BIM中IDM介绍

    参考:http://blog.fang.com/25866228/10613454/articledetail.htm IDM的全称是Information Delivery Manual,信息交付手 ...