0
私は天気をチェックするコードを書くことができます。どの列もデータテーブルに存在するかどうかチェックしてください。データテーブルに行があるか空であるかを調べる
$('#del').click(function() {
tab.row('.selected').remove().draw();
if(window.clck===true){
\t if($("#table").length > -1){
// toastr.options.timeOut = 1500;
// toastr.success("empity");
toastr.options.timeOut = 1500;
toastr.success('deleted');
}
else if($("#table").length <= 0){
\t toastr.options.timeOut = 1500;
toastr.success('empity');
}
}
else
{
\t toastr.options.timeOut = 1500;
toastr.success('please select a row');
}
});
これを確認してくださいhttps://stackoverflow.com/questions/10360450/how-場合to-check-if-a-tr-contains-a-td-with-a-specific-css-class-jquery –