Ext.onReady(function(){
Ext.QuickTips.init();
Ext.BLANK_IMAGE_URL="../images/s.gif";
Ext.Msg.show({
title:'tomcat',msg:'Have you seen my stapler?',
buttons:{
yes:'是',no:'否',cancel:'取消'
},
fn:function (btn)
{
// Ext.Msg.alert('You Clicked',btn);
switch (btn)
{
case 'yes':
Ext.Msg.prompt('Milton','Where is it?',function(btn,txt){
if(txt.toLowerCase()=='the office')
{
Ext.fly('my_id').dom.innerHTML='DullWork';
}else{
Ext.get('my_id').dom.innerHTML=txt;
}
Ext.DomHelper.applyStyles('my_id',{
background:'transparent url(images/stapler.png) 50% 50% no-repeat'
});
});
break;
case 'no':
Ext.Msg.alert('Milton','Im going to burn the building down!',function(){
Ext.DomHelper.applyStyles('my_id',{
'background':'transparent url(images/file.png) 0 100% repeat-x'
});
});
Ext.DomHelper.applyStyles(Ext.getBody(),{
'background-color': '#FF0000'
});
Ext.getBody().highlight('FFCC00',{
endColor:'FF0000',duration:6
});
break;
case 'cancel':
break;
}
}
});
});
看懂就行,