ExtJS 2.0实用简明教程 之ExtJS版的Hello
更新时间:2009年04月29日 14:29:23 作者:
下面我们写一个最简单的ExtJS应用,在hello.html文件中输入下面的代码
复制代码 代码如下:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ExtJS</title>
<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>
Ext.onReady(function()
{
Ext.MessageBox.alert("hello","Hello,easyjf open source");
});
</script>
</head>
<body>
</body>
</html>

进一步,我们可以在页面上显示一个窗口,代码如下:
复制代码 代码如下:
<script>
Ext.onReady(function()
{
var win=new Ext.Window({title:"hello",width:300,height:200,html:'<h1>Hello,easyjf open source</h1>'});
win.show();
});
</script>
在浏览hello.html,即可得在屏幕上显示一个窗口,如图xxx所示。

相关文章
extjs DataReader、JsonReader、XmlReader的构造方法
DataReader、JsonReader、XmlReader的构造方法,需要的朋友可以参考下。2009-11-11
Extjs学习笔记之五 一个小细节renderTo和applyTo的区别
Extjs的组件有两个看起来类似的配置项,applyTo和renderTo,这两个配置项都是用来指定将该extjs组件加载到什么位置。那他们到底有什么区别呢,网上搜了下,有两篇博文也是关于这个的。2010-01-01


最新评论