在jsp中导入extjs的js界面
首先在写了一个登陆界面的loginUI.js文件
Ext.onReady(
function(){
var loginPanel = new Ext.form.FormPanel(。。。省略) 代码肯定没问题 放在ext的例子里试过(html文件),界面没问题
但往jsp中导入时 始终不显示
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>irc</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<link rel="stylesheet" type="text/css" href="../ext-2.3.0/resources/css/ext-all.css" />
<script type="text/javascript" src="../ext-2.3.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-2.3.0/ext-all.js"> </script>
<script type="text/javascript" src="../ext-2.3.0/source/locale/ext-lang-zh_CN.js"></script>
<SCRIPT type="text/javascript" src="../js/loginUI.js"></SCRIPT>
<link rel="stylesheet" type="text/css" href="../ext-2.3.0/resources/css/xtheme-slate.css" />
<link rel="shortcut icon" href="img/favicon.ico" />
</head>
<body>
</body>
</html>
网上看的一般都是写一句导入文件的方法,这里就是没效果,还缺什么东西? 哪位熟悉的给个解答,急等!谢了!
------解决方案--------------------是不是js文件的编码形式和html的不一致?
------解决方案--------------------<SCRIPT type="text/javascript" src="../js/loginUI.js"> </SCRIPT>
换到最后加载试试
------解决方案--------------------路径有问题把