我有一个像下面那样的小朋友
var $container = $("#example1");
$container.handsontable({
data: data1,
rowHeaders:true,
colHeaders: ["Sun","Mon","Tue","Wed","Thr","Fri","Sat"],
cols:13,
minSpareRows: 100
});
<div id="example1" class="dataTable" style="width: 1170px; height: 450px;
overflow:scroll;"></div>
我可以访问表tr值
var rowList = $("#example1").handsontable("getData");
rowList = $.grep(rowList,function(array,index)
{
// here i can access values from first row
});
我需要访问标题“Sun”,“Mon”,“Tue”,“Wed”,“Thrs”,“Fri”,“Sat” 这该怎么做...?请帮助..
答案 0 :(得分:2)
我编辑了这个:
var rowHeaderList = $("#example1").handsontable("getRowHeader"); //for row headers
var colHeaderList = $("#example1").handsontable("getColHeader"); //for column headers
答案 1 :(得分:1)