亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

學(xué)習(xí)ExtJS(二) Button常用方法

 更新時(shí)間:2009年10月07日 22:37:10   作者:  
ExtJS Button常用方法,需要學(xué)習(xí)的朋友可以參考下。
一、屬性
renderTo:將當(dāng)前對(duì)象所生成的HTML對(duì)象存放在指定的對(duì)象中
text:得到按鈕名稱
minWidth:按鈕最小寬度
hidden:按鈕的隱藏或顯示(true or false)
二、構(gòu)造參數(shù)
handler:指定一個(gè)函數(shù)句柄,在默認(rèn)事件觸發(fā)時(shí)調(diào)用,此時(shí)在默認(rèn)事件為click
listeners:在對(duì)象初始化之前,將一系列事件進(jìn)行綁定。
三、函數(shù)
getBogy():對(duì)到Body對(duì)象
onReady():當(dāng)頁面加載完成時(shí)執(zhí)行本函數(shù)
getText():得到按鈕名稱
setText("按鈕名稱"):設(shè)置按鈕名稱
四、應(yīng)用舉例
復(fù)制代碼 代碼如下:

Ext.onReady(function(){
var button= new Ext.Button({
renderTo:Ext.getBody(),
text:"確定",
listeners:{
"click":function()
{
alert("Hello");
}
}
})
button.minWidth=200;
button.setText("EasyPass");
})

復(fù)制代碼 代碼如下:

Ext.onReady(function(){
var button= new Ext.Button({
renderTo:Ext.getBody(),
text:"確定"
})
button.on("click",function(){
alert("hello");
})
button.minWidth=200;
button.setText("EasyPass");
})

相關(guān)文章

最新評(píng)論