- <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
- <script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="extjs/ext-all.js"></script>
- <script type="text/javascript">
-
- Ext.onReady(function () {
- var m = new Ext.MyGrid({});
- m.render(Ext.getBody());
- });
- </script>
将Ext Designer生成的代码保存为test.js,引进页面
<script type="text/javascript" src="test.js"></script><!-- EXAMPLES -->
完整页面代码:
- <%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
-
- <title>My JSP 'index.jsp' starting page</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">
- <meta http-equiv="description" content="This is my page">
- <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
- <script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="extjs/ext-all.js"></script>
- <script type="text/javascript">
-
- Ext.onReady(function () {
- var m = new Ext.MyGrid({});
- m.render(Ext.getBody());
- });
- </script>
-
- </head>
-
- <body>
- <script type="text/javascript" src="test.js"></script><!-- EXAMPLES -->
- </body>
- </html>