Javascript 无法读取属性';插入前';null-handsontable.full.js的值:3714

Javascript 无法读取属性';插入前';null-handsontable.full.js的值:3714,javascript,html,handsontable,Javascript,Html,Handsontable,我尝试运行Quick start链接()中提到的示例。通过Git hub下载所有文件。尝试运行quick start中提到的示例时,出现以下错误“无法读取null-handsontable.full.js:3714的属性'insertBefore'。请帮助我运行基本示例 使用的版本-v0.16.1 代码: 风险值数据=[ [、“福特”、“沃尔沃”、“丰田”、“本田”], ["2014", 10, 11, 12, 13], ["2015", 20, 11, 14, 13], ["2016", 3

我尝试运行Quick start链接()中提到的示例。通过Git hub下载所有文件。尝试运行quick start中提到的示例时,出现以下错误“无法读取null-handsontable.full.js:3714的属性'insertBefore'。请帮助我运行基本示例

使用的版本-v0.16.1

代码:


风险值数据=[
[、“福特”、“沃尔沃”、“丰田”、“本田”],
["2014", 10, 11, 12, 13],
["2015", 20, 11, 14, 13],
["2016", 30, 15, 12, 13]
];
var container=document.getElementById('example');
var hot=新的可手持设备(容器、{
数据:数据,
会议记录:1,
行标题:对,
colHeaders:是的,
上下文菜单:true
});
身体{
背景色:白色;
利润率:20px;
}
氢{
利润率:20px0;
}
默认可手持演示

尝试将3个脚本节点放在身体而不是头部。这感觉像是如何加载模块的问题。

尝试将3个脚本节点放在身体而不是头部。这感觉就像是您如何加载模块的问题。

我有同样的错误,至少对我来说,错误发生是因为我使用了不存在的元素ID

在这方面:

var container = document.getElementById("example");
确保您的div的ID具有相同的名称。在这种情况下,它是“示例”:



如果在加载Handsontable时容器未定义,将显示此错误消息。

我也有相同的错误,至少对我来说,发生此错误是因为我使用了不存在的元素ID

在这方面:

var container = document.getElementById("example");
确保您的div的ID具有相同的名称。在这种情况下,它是“示例”:



如果在加载Handsontable时容器
未定义
,将显示此错误消息。

某些时间甚至空间会导致此错误

// example 
var container = document.querySelector('header .container');
//in this i made mistake of space between header and container class so  he can't find and show me error
var container = document.querySelector('header .container');

某些时间甚至空间会导致此错误

// example 
var container = document.querySelector('header .container');
//in this i made mistake of space between header and container class so  he can't find and show me error
var container = document.querySelector('header .container');

@ZekeDroid的回答帮助我解决了这个问题。很抱歉回复晚了。这是我的工作:@ZekeDroid的回答帮助我解决了这个问题。很抱歉,回复太晚。这是我的工作: