Javascript 如何在handsontable上添加行删除确认消息
在handsontable row_remove contextmenu中,是否可以在删除行之前附加确认消息,以便用户可以选择取消请求?是。在文档中,有一个可用于在删除行之前调用函数的 您可以在表格的delcaration中使用它:Javascript 如何在handsontable上添加行删除确认消息,javascript,handsontable,Javascript,Handsontable,在handsontable row_remove contextmenu中,是否可以在删除行之前附加确认消息,以便用户可以选择取消请求?是。在文档中,有一个可用于在删除行之前调用函数的 您可以在表格的delcaration中使用它: $(document).ready(function () { var container = document.getElementById('basic_example'); var data = function () { return Ha
$(document).ready(function () {
var container = document.getElementById('basic_example');
var data = function () {
return Handsontable.helper.createSpreadsheetData(100, 12);
};
var hot = new Handsontable(container, {
data: data(),
height: 396,
colHeaders: true,
rowHeaders: true,
stretchH: 'all',
columnSorting: true,
contextMenu: true,
beforeRemoveRow: function(){return confirm("Are you sure you want to remove this row?")}
});
});
下面是一个例子