具有用于我构造的数据表的html和js代码
<button class="test">test</button>
<table id="example2" class="display table " width="100%">
<thead>
<tr>
<th>Code</th>
<th>Email</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>abc12345</td>
<td data-search="derrick1@gmail.com"><input name="email[]" id="row-email-0" value="derrick1@gmail.com" /></td>
<td>N/A</td>
</tr>
</tbody>
</table>
<script>
var theTable = $('#example2').DataTable({
"ordering": false
});
theTable.row.add([
'abc432',
'<input name="email[]" id="row-email-\' + rowIndex + \'" value="" />',
'N/A'
]).draw(false)
</script>
如何在数据表的row.add方法上设置数据搜索属性?
答案 0 :(得分:1)
请参见-> https://datatables.net/forums/discussion/42814/requested-unknown-parameter-object-object ...您可以通过以下方式添加var gl = document.createElement('canvas').getContext('webgl')
console.log(gl.getParameter(gl.MAX_TEXTURE_SIZE))
属性:
gl.getParameter(gl.MAX_TEXTURE_SIZE)/2
演示您的代码-> https://jsfiddle.net/h7Lno4yx/