学习ExtJS(二) Button常用方法
来源:互联网 发布:js data toggle 编辑:程序博客网 时间:2024/06/06 02:06
一、属性
renderTo:将当前对象所生成的HTML对象存放在指定的对象中
text:得到按钮名称
minWidth:按钮最小宽度
hidden:按钮的隐藏或显示(true or false)
二、构造参数
handler:指定一个函数句柄,在默认事件触发时调用,此时在默认事件为click
listeners:在对象初始化之前,将一系列事件进行绑定。
三、函数
getBogy():对到Body对象
onReady():当页面加载完成时执行本函数
getText():得到按钮名称
setText("按钮名称"):设置按钮名称
四、应用举例
Ext.onReady(function(){
var button= new Ext.Button({
renderTo:Ext.getBody(),
text:"确定"
})
button.on("click",function(){
alert("hello");
})
button.minWidth=200;
button.setText("EasyPass");
})
二、构造参数
handler:指定一个函数句柄,在默认事件触发时调用,此时在默认事件为click
listeners:在对象初始化之前,将一系列事件进行绑定。
三、函数
getBogy():对到Body对象
onReady():当页面加载完成时执行本函数
getText():得到按钮名称
setText("按钮名称"):设置按钮名称
四、应用举例
Ext.onReady(function(){
var button= new Ext.Button({
renderTo:Ext.getBody(),
text:"确定",
listeners:{
"click":function()
{
alert("Hello");
}
}
})
button.minWidth=200;
button.setText("EasyPass");
})
var button= new Ext.Button({
renderTo:Ext.getBody(),
text:"确定",
listeners:{
"click":function()
{
alert("Hello");
}
}
})
button.minWidth=200;
button.setText("EasyPass");
})
Ext.onReady(function(){
var button= new Ext.Button({
renderTo:Ext.getBody(),
text:"确定"
})
button.on("click",function(){
alert("hello");
})
button.minWidth=200;
button.setText("EasyPass");
})
- 学习ExtJS(二) Button常用方法
- 学习ExtJS(二) Button常用方法
- 学习ExtJS(三) TextField常用方法
- 学习ExtJS(四) Panel常用方法
- 学习ExtJS(五) Window常用方法
- 学习ExtJS Panel常用方法
- 学习ExtJS Panel常用方法
- 学习ExtJS Panel常用方法
- 学习ExtJS Window常用方法
- 学习ExtJS Window常用方法
- Extjs学习之button
- extjs学习(二)
- ExtJS提供常用相关方法(学习积累)
- dhtmlxtree学习笔记二(常用方法)
- ExtJS学习--------Ext.Element中的常用事件和其他重要的方法学习(实例)
- EXTJS 常用方法
- ExtJS常用方法
- ExtJs常用方法总结
- spring 事务管理
- SAP小程序
- 给自己创建的对象排序
- 自己动手做按钮
- 学习ExtJS(一)
- 学习ExtJS(二) Button常用方法
- Xp下安装SQL2000提示之前有挂起
- 创建数据库
- 学习ExtJS(三) TextField常用方法
- 架构师已死(转自UML软件工程组织)
- isnull的错误:将 expression 转换为数据类型 nvarchar 时出现算术溢出错误
- Linux环境进程间通信(四)
- 学习ExtJS(四) Panel常用方法
- 体验Microsoft的函数式编程语言F#