【发布时间】:2015-03-10 16:02:39
【问题描述】:
我有一个从 node.js 服务器运行的 html 页面。我正在尝试使用 syncfusions 基本网格功能,并按照http://help.syncfusion.com/web 提供的设置进行操作。
我的代码如下:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<link href="http://cdn.syncfusion.com/js/web/flat-azure/ej.web.all-latest.min.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>
<script src="http://borismoore.github.io/jsrender/jsrender.min.js"></script>
<script src="http://cdn.syncfusion.com/js/web/ej.web.all-latest.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
window.dataManager = ej.DataManager({
url: "http://mvc.syncfusion.com/UGService/api/Orders",
crossDomain: true,
offline:true
});
$("#Grid").ejGrid({
dataSource: window.dataManager,
allowPaging: true,
allowFiltering: true,
columns: [
{ field: "Order", headerText: "Order ID", width: 75, textAlign: ej.TextAlign.Right },
{ field: "CustomerID", headerText: "Customer ID", width: 80 },
{ field: "ShipName", headerText: "Ship Name", width: 100 },
{ field: "ShipCity", headerText: "Ship City", width: 100 },
{ field: "Freight", width: 80, format: "{0:C3}", textAlign: ej.TextAlign.Right }
]
});
});
</script>
</head>
<body>
<div id="Grid"></div>
</body>
</html>
<body>
<div id="Grid"></div>
</body>
</html>
我刚刚复制并粘贴了它并尝试运行它但得到了错误
ej.web.all-latest.min.js:1 Uncaught SyntaxError: Unexpected token ILLEGAL test.html:27 Uncaught ReferenceError: ej is not defined
我已经为 ej 包含了他们的 js 文件。 第一个错误是这个文件的第一行http://cdn.syncfusion.com/js/web/ej.web.all-latest.min.js
发生了什么?我想不通:/ 任何帮助都会很棒,因为今天是我开始使用 syncfusion 的第一天,并且没有太多文档可以帮助您进行设置...
【问题讨论】:
标签: javascript syncfusion