我理解这是一个基于java的框架,但我想尝试在asp.net应用程序中实现一个小部件,因为它主要涉及javascript内容。我将库添加到项目文件夹目录中,似乎jar文件没有像预期的那样加载。
Failed to load resource: the server responded with a status of 404
(Not Found) http://localhost:52856/extjs/ext-debug.js
Failed to load resource: the server responded with a status of 404
(Not Found) http://localhost:52856/extjs/examples/app/simple/app.js
Failed to load resource: the server responded with a status of 404
(Not Found) http://localhost:52856/extjs/examples/shared/include-ext.js
Failed to load resource: the server responded with a status of 404
(Not Found) http://localhost:52856/extjs/examples/shared/options-toolbar.js
Failed to load resource: the server responded with a status of 404
(Not Found) http://localhost:52856/portal.js
Extjs有清洁发展机制吗?我们可以像google.apis一样从其中加载库。
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="extjs/ext-debug.js"></script>
<script type="text/javascript" src="extjs/examples/app/simple/app.js"></script>
<script type="text/javascript" src="extjs/examples/shared/include-ext.js"></script>
<script type="text/javascript" src="extjs/examples/shared/options-toolbar.js"></script>
<link rel="stylesheet" type="text/css" href="extjs/examples/portal/portal.css" />
<script type="text/javascript">
Ext.Loader.setPath('Ext.app', 'classes');
</script>
<script type="text/javascript" src="portal.js"></script>
<script type="text/javascript">
Ext.require([
'Ext.layout.container.*',
'Ext.resizer.Splitter',
'Ext.fx.target.Element',
'Ext.fx.target.Component',
'Ext.window.Window',
'Ext.app.Portlet',
'Ext.app.PortalColumn',
'Ext.app.PortalPanel',
'Ext.app.Portlet',
'Ext.app.PortalDropZone',
'Ext.app.GridPortlet',
'Ext.app.ChartPortlet'
]);
Ext.onReady(function () {
Ext.create('Ext.app.Portal');
});
</script>
</head>
<body>
<span id="app-msg" style="display:none;"></span>
编辑
我接受了下面的答案,但当尝试加载其他文件时,我发现自己现在有着无尽的错误。我以为ext-all.js基本上加载了所有的引用,您必须在函数中定义这些引用,但我想我又迷路了。
Failed to load resource: the server responded with a status of 404
(Not Found) http://cdn.sencha.com/ext/gpl/4.2.1/ext-base.js
Uncaught TypeError: Object prototype may only be an Object or null
ext-all-debug.js:19552
Uncaught ReferenceError: Highcharts is not defined exporting.js:9
Uncaught TypeError: Object [object Object] has no method 'addCls' ext-all.js:21
发布于 2013-12-19 10:30:36
Extjs有一个CDN。您可以在:http://cdn.sencha.com/ext/gpl/4.2.1/ext-all.js访问它
编辑:从您的文章中,看起来您正在尝试将整个示例导入您的项目中。我会开始变小的。下面是如何将窗口加载到页面中的示例:
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/ext-all.js"> </script>
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/gpl/4.2.1/resources/css/ext-all.css" />
<script type="text/javascript">
Ext.require([
'Ext.window.Window'
]);
Ext.onReady(function () {
var window = Ext.create('Ext.window.Window', {
title: "my first ext window",
width: 250,
height: 150
});
window.show();
});
</script>
https://stackoverflow.com/questions/20688835
复制相似问题