如何使用jquery禁用datatable按钮

如何使用jquery禁用datatable按钮,jquery,button,datatable,Jquery,Button,Datatable,此代码将删除该按钮,但我需要显示该按钮,但要禁用该按钮,用户应无法单击它。使用禁用属性禁用该按钮 暗示您的代码应该是 $('td:last-child a:eq(0)', nRow).remove(); 供进一步参考: -帮助:) 或 我试过这个代码,但不起作用。。使用prop时未加载datatable $('td:last-child a:eq(0)', nRow).prop('disabled', true); $('td:last-child a:eq(0)', nRow).prop(

此代码将删除该按钮,但我需要显示该按钮,但要禁用该按钮,用户应无法单击它。

使用
禁用属性禁用该按钮

暗示您的代码应该是

$('td:last-child a:eq(0)', nRow).remove();
供进一步参考:

-帮助:)


我试过这个代码,但不起作用。。使用prop时未加载datatable
$('td:last-child a:eq(0)', nRow).prop('disabled', true);
$('td:last-child a:eq(0)', nRow).prop('disabled', true);
$('td:last-child a:eq(0)', nRow).css('disabled', 'disabled');