window基本功能介绍
来源:互联网 发布:js获取form表单参数 编辑:程序博客网 时间:2024/05/22 04:43
1、提示框的各种显示形式
Ext.MessageBox.alert('标题', '内容', function (btn) {
alert('你刚刚点击了 ' + btn);
});
Ext.MessageBox.confirm('选择框', '你到底是选择yes还是no?', function (btn) {
alert('你刚刚点击了 ' + btn);
});
Ext.MessageBox.prompt('输入框', '随便输入一些东西', function (btn, text) {
alert('你刚刚点击了 ' + btn + ',刚刚输入了 ' + text);
});
Ext.MessageBox.show({
title: '多行输入框',
msg: '你可以输入好几行',
width: 300,
buttons: Ext.MessageBox.OKCANCEL,
multiline: true,
fn: function (btn, text) {
alert('你刚刚点击了 ' + btn + ',刚刚输入了 ' + text);
}
});
Ext.MessageBox.show({
title: '随便按个按钮',
msg: '从三个按钮里随便选择一个',
buttons: Ext.MessageBox.YESNOCANCEL,
fn: function (btn) {
alert('你刚刚点击了 ' + btn);
}
});
Ext.MessageBox.show({
title: '请等待',
msg: '读取数据中',
width: 240,
progress: true,
closable: false
});
var f = function (v) {
return function () {
if (v == 11) {
Ext.MessageBox.hide();
} else {
Ext.MessageBox.updateProgress(v / 10, '正在读取第 ' + v + ' 个,一共10个。');
}
};
};
for (var i = 1; i < 12; i++) {
setTimeout(f(i), i * 1000);
}
2、弹窗
var win = new Ext.Window({
el:'window-win',
width:300,
height:100,
closeAction:'hide',
defaultButton: 0,
buttons: [{
text: '确定',
handler: function() {
win.hide();
}
}, {
text: '取消'
}]
});
win.show();
3、显示动画效果:
animateTarget: 'target'
4、
Ext.MessageBox.alert('标题', '内容', function (btn) {
alert('你刚刚点击了 ' + btn);
});
Ext.MessageBox.confirm('选择框', '你到底是选择yes还是no?', function (btn) {
alert('你刚刚点击了 ' + btn);
});
Ext.MessageBox.prompt('输入框', '随便输入一些东西', function (btn, text) {
alert('你刚刚点击了 ' + btn + ',刚刚输入了 ' + text);
});
Ext.MessageBox.show({
title: '多行输入框',
msg: '你可以输入好几行',
width: 300,
buttons: Ext.MessageBox.OKCANCEL,
multiline: true,
fn: function (btn, text) {
alert('你刚刚点击了 ' + btn + ',刚刚输入了 ' + text);
}
});
Ext.MessageBox.show({
title: '随便按个按钮',
msg: '从三个按钮里随便选择一个',
buttons: Ext.MessageBox.YESNOCANCEL,
fn: function (btn) {
alert('你刚刚点击了 ' + btn);
}
});
Ext.MessageBox.show({
title: '请等待',
msg: '读取数据中',
width: 240,
progress: true,
closable: false
});
var f = function (v) {
return function () {
if (v == 11) {
Ext.MessageBox.hide();
} else {
Ext.MessageBox.updateProgress(v / 10, '正在读取第 ' + v + ' 个,一共10个。');
}
};
};
for (var i = 1; i < 12; i++) {
setTimeout(f(i), i * 1000);
}
2、弹窗
var win = new Ext.Window({
el:'window-win',
width:300,
height:100,
closeAction:'hide',
defaultButton: 0,
buttons: [{
text: '确定',
handler: function() {
win.hide();
}
}, {
text: '取消'
}]
});
win.show();
3、显示动画效果:
animateTarget: 'target'
4、
- window基本功能介绍
- Mantis基本功能介绍
- Trac 基本功能介绍
- Layout基本功能介绍
- tree基本功能介绍
- OpenStack:Nova基本功能介绍
- QTP的基本功能介绍
- Axure RP基本功能介绍
- 数据类型基本功能介绍
- 博达宝基本功能介绍
- RaceWeb介绍(1):基本功能
- Jetty:基本功能介绍
- QTP的基本功能介绍
- Axure RP 基本功能介绍
- systemd基本功能介绍
- NZT基本功能介绍
- Jetty基本功能介绍
- Unity摄像机基本功能介绍
- 汇编 生成随机数
- 楔子
- WebCore Rendering 1 - 基础
- Layout基本功能介绍
- tree基本功能介绍
- window基本功能介绍
- 如何在Google成为一名优秀的产品经理?
- EnumChildWindows的使用
- Qt网络编程
- 打包安装
- 用c++创建一个Linux上的Daemon程序,含SHELL管理脚本(三)
- 深度优先搜索 广度优先搜索类训练题
- Mapper与Reducer的链接
- fatal error CVT1100