日期:2014-05-16  浏览次数:20733 次

一个简单的EXTJS例子,可是就是报EXT未定义 - Web 开发 / Ajax
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <title>sample.html</title>

   
  <script type="text/javascript" src="script/ext/adapter/ext/ext-base.js"></script>
  <script type="text/javascript" src="script/ext/ext-all.js"></script>
  <link rel="stylesheet" type="text/css" href="script/ext/resources/css/ext-all.css"/>
   
  <script type="text/javascript">
  Ext.onReady(function() {
Ext.Msg.alert("hello");
});
  </script>
  </head>
  
  <body>
 HELLO WORLD

  </body>
</html>

一个简单的EXTJS例子,可是就是报EXT未定义


------解决方案--------------------
src = 后面的路径不对
------解决方案--------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Panel</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<!-- GC -->
  <!-- LIBS -->
  <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
  <!-- ENDLIBS -->
<script type="text/javascript" src="../../ext-all.js"></script>
<script type="text/javascript"> 
Ext.onReady(function() { 
Ext.Msg.alert("hello"); 
}); 
</script> 
</head>
<body>

<p>Ext.js</a>.</p>

</body>
</html>

你把路径改一下,试试我的
------解决方案--------------------
路径问题!!!
你哪个HTML文件要和script文件夹~~~~要在同一个文件夹内!
------解决方案--------------------
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" /> 
<script type="text/javascript" src="../../adapter/ext/ext-base.js"> </script>
<script type="text/javascript" src="../../ext-all.js"> </script> 
一定要按这种序顺