sillycat 发表于 2013-2-7 15:41:48

EXT2.2入门(二)

EXT2.2入门(二)

下载了工具
http://www.adobe.com/products/air/
可以查询使用EXT的API文档了

使用了一下
Ext.MessageBox
Ext.Window

具体使用场景
1、给出信息提示框
Ext.MessageBox.alert("提示信息", "没有可查看的照片!");

2、弹出窗口显示一个图片
在原有页面加入如下HTML
<div id="hello-win" class="x-hidden">
    <div class="x-window-header">照片浏览</div>
    <div id="hello-tabs">
      <div id="clickPicture" title="照片浏览" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);width:700px;height:600px;">
      </div>
    </div>
</div>
其中的AlphaImageLoader滤镜是用来在IE7上加载图片的本地或远程URL用的
在JAVASCRIPT中操作如下:
changePictureUrl("clickPicture", path);
//以上代码,先装在图片,下面再显示窗口
if (!win) {
   win = new Ext.Window({
    applyTo : 'hello-win',
    layout : 'fit',
    width : 710,
    height : 670,
    closeAction : 'hide',
    plain : true,
    items : new Ext.TabPanel({
   applyTo : 'hello-tabs',
   autoTabs : true,
   activeTab : 0,
   deferredRender : false,
   border : false
    }),

    buttons : [{
   text : '关闭',
   handler : function() {
      win.hide();
   }
    }]
   });
}
win.show();
页: [1]
查看完整版本: EXT2.2入门(二)