引用http://blog.csdn.net/tianxiaode/article/details/6571589 这个案例,实现前台的三层。兄弟不才,愚钝认为只需要在项目目录下创建一个独立目录,通过action调用就可以了。
页面前端直接调用该JS
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Ext 4 Loader</title>
<link rel="stylesheet" type="text/css" href="__ExtCSS__/ext-all.css"/>
<style type="text/css">
</style>
<script type="text/javascript" src="__ExtJS__/bootstrap.js"></script>
<script type="text/javascript" src="__JS__/MyApp/pass3.js"></script>
</head>
<body>
<p>ExtJS Demo Page</p>
</body>
</html>问题出来了,ExtJS框架库访问没有问题。控制台却一直提示错误:Uncaught SyntaxError: Unexpected token < UserEditorWindow.js:1
The following classes are not declared even if their files have been loaded: 'MyApp.views.UserEditorWindow'. Please check the source code of their corresponding files for possible typos: 'js/MyApp/views/UserEditorWindow.js' ext-all-debug.js:5477
ob
ext-all-debug.js:5483
console.trace() ext-all-debug.js:5489
Uncaught The following classes are not declared even if their files have been loaded: 'MyApp.views.UserEditorWindow'. Please check the source code of their corresponding files for possible typos: 'js/MyApp/views/UserEditorWindow.js' 。
期间通过静态发布该内容没有问题。通过多种尝试判断是因为其内部引用文件问题,不知道哪位兄台遇到过,请求帮助。该静态源码可在上面的连接下载。
最佳答案