【发布时间】:2016-10-04 22:42:01
【问题描述】:
我正在检查Handsontable for developers 我的一个项目。我试图按照他们的教程初始化一个可动手做的对象。但我不断收到 TypeError。
我的代码在下面-
var data = [
["","Ford","Volvo","Toyota","Honda"],
["2016", 10, 11, 12, 13],
["2017", 20, 11, 14, 13],
["2018", 30, 15, 12, 13]
];
var container = $("#example");
var hot = new Handsontable(container, {
data: data,
rowHeaders: true,
colHeaders: true
});
<link href="http://docs.handsontable.com/0.25.0/bower_components/handsontable/dist/handsontable.full.css" rel="stylesheet"/>
<script src="http://docs.handsontable.com/0.25.0/bower_components/handsontable/dist/handsontable.full.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-rc1/jquery.min.js"></script>
<div id="example"></div>
演示 - https://jsfiddle.net/x1w95ndx/
过去一小时我一直在努力寻找解决方案。如果有人告诉我正确的方向,这对我真的很有帮助。
【问题讨论】:
标签: javascript jquery handsontable