gpt4 book ai didi

javascript - 为数据表中的第 0 行请求了未知参数 '4'

转载 作者:行者123 更新时间:2023-11-28 01:32:48 25 4
gpt4 key购买 nike

我在尝试使用 jQuery DataTables 库运行数据表时遇到上述错误。

Requested unknown parameter '4' for row 0.

<div class="container">
<%= render :partial => "layouts/society_nav" %>
<div align="center">
<h3>Self Help Groups</h3>
</div>
<%=link_to "New Self Help Groups" ,new_admin_self_help_group_path,:class=>"btn btn-primary btn-new"%>

<table class="datatable table-bordered">
<thead>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</thead>

<tbody>
<% @selfhelp.each do |s| %>
<tr>
<td class="thead">No of SHGS</td>
<td colspan="2"><%= s.no_of_shgs %></td>
<td> <%= link_to "<span class='glyphicon glyphicon-edit'></span>".html_safe, edit_admin_self_help_group_path(s) %>
</td>
<td> <%= link_to "<span class='glyphicon glyphicon-trash'></span>".html_safe, admin_self_help_group_path(s), :method => :delete, :title => "Delete?", "data-confirm" => "Do you really want to delete?" %>
</td>
</tr>
<tr>
<td class="thead">Out of which No of Women SHG</td>
<td colspan="2"><%= s.no_of_women_shgs %></td>
<td> <%= link_to "<span class='glyphicon glyphicon-edit'></span>".html_safe, edit_admin_self_help_group_path(s) %>
</td>
<td> <%= link_to "<span class='glyphicon glyphicon-trash'></span>".html_safe, admin_self_help_group_path(s), :method => :delete, :title => "Delete?", "data-confirm" => "Do you really want to delete?" %>
</td>
</tr>
<% end %>
</tbody>
</table>

最佳答案

DataTables 库不支持 colspan在表体中,参见this tech note .

This error can occur if there is a colspan or rowspan in the tbody of the table, which is not supported by DataTables.

但是 DataTables 完全支持 colspanrowspan在表格的标题中,假设至少有一个唯一的 <th>对于每一列,请参阅 DataTables complex header example了解更多详情。

关于javascript - 为数据表中的第 0 行请求了未知参数 '4',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29752701/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com