日期:2014-05-16 浏览次数:20536 次
var mywin = Ext.create('Ext.window.Window', { title: 'asdfsfadfad', height: 400, width: 500,
'close': function (pa, oe) {
Ext.MessageBox.alert('asfsa', 'asdfds');
}
});
mywin.show();
<script type="text/javascript" >
Ext.onReady(function(){
Ext.define('testWindow', {
extend : 'Ext.Window',
alias : 'widget.testWindow',
width : 300,
height : 200,
title:'test',
items:[
{
xtype:'button',
text:"确定",
listeners : {
scope : this,
click : function(){
alert(11);
}
}
},{
xtype:'button',
text:"取消",
listeners : {
scope : this,
click : onClick
}
}
]
});
var win = Ext.create('testWindow');
win.show();
})
function onClick(){
alert(112);
}
</script>