我按照用户建议的步骤: PostureOfLearning 并提出了一个测试代码,我将其粘贴在下面。它在 Chrome 中运行良好,但在 IE 中运行良好。如果我需要进行任何更改以使代码在 IE 中运行,请告诉我。提前致谢。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.plugin.js" type="text/javascript"></script>
<script src="custom.js" type="text/javascript"></script>
<script src="C:\wamp\www\rrr\bin\jquery-handsontable-master\dist_wc\x-handsontable\jquery.handsontable.full.js"></script>
<link rel="stylesheet" media="screen" href="C:\wamp\www\rrr\bin\jquery-handsontable-master\dist_wc\x-handsontable\jquery.handsontable.full.css">
</head>
<body>
<div id="handsontableDivID">
<script>
var data = [
["", "Maserati", "Mazda", "Mercedes", "Mini", "Mitsubishi"],
["2009", 0, 2941, 4303, 354, 5814],
["2010", 5, 2905, 2867, 412, 5284],
["2011", 4, 2517, 4822, 552, 6127],
["2012", 2, 2422, 5399, 776, 4151]
];
var config = {
data: data,
minRows: 5,
minCols: 6,
minSpareRows: 1,
autoWrapRow: true,
colHeaders: true,
contextMenu: true
};
$("#handsontableDivID").handsontable(config);
</script>
</body>
</html>
我得到的错误是 SCRIPT1014: Invalid character jquery.handsontable.full.js, line 1 character 1 SCRIPT438: Object doesn't support property or method 'handsontable' test1.html, line 32 character 1