【发布时间】:2012-06-13 02:25:13
【问题描述】:
Q1:在发送到服务器之前验证用户在 jQuery Handsontable 中输入的数据的最佳方法是什么?
我读过这篇文章 Upload jQuery Handsontable input
有没有集成解决方案? etc 集成到 jquery 验证插件中,如果没有,使用 onbeforechange() 方法怎么样?
Q2:另外,我已经启动了一个100行的表,但是如果我使用下面的代码,用户可能只会输入50行:
$('#btnGo').click(function() {
var rowList = $("#example9grid").handsontable("getData");
$('#simple').val(JSON.stringify(rowList));
console.log(rowList);
});
rowList 将返回 50 个数据行和 50 个空行。
如何删除所有空行?
【问题讨论】:
标签: javascript jquery jquery-plugins handsontable