我是 dojo 的新手,所以我遵循了一个示例: http: //livedocs.dojotoolkit.org/dijit/layout
这工作正常...
现在,如果我使用在我的 domino 服务器上下载的 src 1.7.2,我会收到一个错误:无法加载类 'dijit/layout/BorderContainer
如果我查看 firebug,dojo.js 会与其他 .js 和 .css 文件一起加载。
我不明白为什么它不起作用......
HTML 文件位于服务器的根目录,包含以下代码:
<!DOCTYPE html>
<html >
<head>
<link rel="stylesheet" href="./dojo-release-1.7.2-src/dijit/themes/claro/claro.css">
<script src='./dojo-release-1.7.2-src/dojo/dojo.js' data-dojo-config='parseOnLoad: true'></script>
<script>require(["dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/TabContainer", "dijit/layout/AccordionContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionPane"]);</script>
</head>
<body class="claro">
<div data-dojo-type="dijit/layout/BorderContainer" style="width: 100%; height: 100%;">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">Top pane</div>
<div data-dojo-type="dijit/layout/AccordionContainer" data-dojo-props="region:'leading'">
<div data-dojo-type="dijit/layout/AccordionPane" title="pane #1">accordion pane #1</div>
<div data-dojo-type="dijit/layout/AccordionPane" title="pane #2">accordion pane #2</div>
<div data-dojo-type="dijit/layout/AccordionPane" title="pane #3">accordion pane #3</div>
</div>
<div data-dojo-type="dijit/layout/TabContainer" data-dojo-props="region:'center'">
<div data-dojo-type="dijit/layout/ContentPane" title="tab #1">tab pane #1</div>
<div data-dojo-type="dijit/layout/ContentPane" title="tab #2">tab pane #2</div>
<div data-dojo-type="dijit/layout/ContentPane" title="tab #3">tab pane #3</div>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'trailing'">Trailing pane</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom'">Bottom pane</div>
</div>
</body>
</html>
很确定我错过了一些……欢迎大家帮忙:)