如何使用jquery禁用数据表按钮

时间:2016-01-15 10:22:01

标签: jquery button datatable

$('td:last-child a:eq(0)', nRow).remove();

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

2 个答案:

答案 0 :(得分:3)

使用disable属性禁用按钮。

表示你的代码应该是

$('td:last-child a:eq(0)', nRow).prop('disabled', true);

供进一步参考:HTML Button disable

- 帮助:)

答案 1 :(得分:0)

$('td:last-child a:eq(0)', nRow).prop('disabled', true);

$('td:last-child a:eq(0)', nRow).css('disabled', 'disabled');