面我们写一个最简单的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>

 《ExtJS2.0实用简明教程》之ExtJS版的Hello

图1-11  hello.html页面效果

  进一步,我们可以在页面上显示一个窗口,代码如下: Ext.onReady(function() { var win=new Ext.Window({title:"hello",width:300,height:200,html:'

Hello,easyjf open source

'}); win.show(); });

 

<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所示。

 《ExtJS2.0实用简明教程》之ExtJS版的Hello

相关文章:

  • 2021-12-27
  • 2021-10-15
  • 2021-08-21
  • 2018-07-05
  • 2021-12-13
  • 2018-03-14
  • 2021-11-21
  • 2021-04-25
猜你喜欢
  • 2021-06-16
  • 2021-06-06
  • 2021-09-11
  • 2021-09-08
  • 2021-09-07
  • 2021-10-05
相关资源
相似解决方案