我想知道是否有办法让DataTables
输入属性为只读。我想显示页码但不希望用户更改页码。
这是我的JQuery和pagingType输入
var table = $('#esignTable').DataTable({"sDom": '<"top"flp>rt<"bottom"i><"clear">',
pagingType: 'input',
pageLength: 5,
language: {
"sEmptyTable": " ",
oPaginate: {
sNext: '<i class="fa fa-forward"></i>',
sPrevious: '<i class="fa fa-backward"></i>',
sFirst: '<i class="fa fa-step-backward"></i>',
sLast: '<i class="fa fa-step-forward"></i>'
}
}
});
我希望突出显示的部分是只读的。
由于
答案 0 :(得分:0)
您可以将此行用于您的数据表功能,它可以执行您想要的操作。
pagingType: 'input disabled',
或者你可以获得该文本框的类名,然后使用jquery可以只读它。
$(".classname").attr("readonly",true);