Ext开发:表单创建与交互的实用指南
1. 页面交互响应
在页面中,我们可以根据用户对对话框的响应来触发一些反应。以下是处理用户点击“是”和“否”按钮的代码示例:
switch (response) {
case 'yes':
Ext.Msg.prompt('Milton', 'Where is it?', function(btn, txt) {
if (txt.toLowerCase() == 'the office') {
Ext.get('my_id').dom.innerHTML = 'Dull Work';
} 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', {
超级会员免费看
订阅专栏 解锁全文
1445

被折叠的 条评论
为什么被折叠?



