我正在使用插件「DataTables」,我想要逐行添加圖片,當用戶單擊時,調用另一個url。爲插件添加按鈕行JQuery DataTables
我跟着www.datatables.net的例子,但是給下面的錯誤:從數據源請求未知參數「4」的第0行:
數據表警告(表ID =「myDataTable」)。
記錄顯示在屏幕上
<h2>Index</h2>
<script type="text/javascript">
$(document).ready(function() {
var oTable = $('#myDataTable').dataTable({
"bServerSide": true,
"sAjaxSource": "AjaxHandler",
"bProcessing": true,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "mDataProp": "ID", "bSortable": false },
{ "mDataProp": "Nome", "sTitle": "Identificação do produto" },
{ "mDataProp": "Address", "sTitle": "Descrição do produto" },
{ "mDataProp": "Town" },
{ "fnRender": function (o) {return '<a href=/Produto/Detalhar/' + o.aData[0] + '>' + 'More' + '</a>';}}
],
});
});
</script>
<table id="myDataTable" class="display">
<thead>
<tr>
<th>ID</th>
<th>Company name</th>
<th>Address</th>
<th>Town</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
嗨,這段代碼是工作這個網址http://www.flexgestor.com.br/CA,和dataTable版本是1.9.4 @Daniele Armanasco –