easyui--tab 选项卡组件



$('#box').tabs({
width:600,
height:600,
plain:false,
//fit:true,
//border:false,
scrollIncrement:1,
scrollDuration:1000,
tools:[{
iconCls:'icon-add',
handler:function(){
alert('添加');
},},
{}],
//tools:'#tab-tools',
toolPosition:'left',
tabPosition:'left',
headerWidth:100,
tabWidth:100,
tabHeight:50,
selected:1,
//showHeader:false,
onLoad:function(panel){
alert(panel);
},
onSelect:function(title,index){
alert('selected');
},
onUnselect:function(title,index){
alert('onUnselect');
},
onBeforeClose:function(title,index){
alert(title+'|'+index);
return false;
},
onClose:function(title,index){
alert('close');
},
onAdd:function(title,index){
alert('add');
},
        onUpdate:function(title,index){
alert('onUpdate');
},
onContextMenu:function(e,title,index){
alert(onContextMenu);
},












});
setTimeout(function(){
console.log($('#box').tabs('options'));
},5000);
setTimeout(function(){
console.log($('#box').tabs('tabs'));
},7000);
setTimeout(function(){
$('#box').tabs('add',{title:'new panel',selected:false,});
console.log('add');
},10000);
setTimeout(function(){
$('#box').tabs('select',1);
console.log('select');
},13000);
setTimeout(function(){
$('#box').tabs('select',0);
console.log('onUnselect');
},16000);
setTimeout(function(){
$('#box').tabs('close',1);
console.log('close');
},20000);
setTimeout(function(){

console.log($('#box').tabs('exists',4));
},22000);
setTimeout(function(){

console.log($('#box').tabs('getTab',1));
},24000);
setTimeout(function(){

console.log($('#box').tabs('getTabIndex','#tabs2'));
},26000);
setTimeout(function(){

console.log($('#box').tabs('getSelected'));
},28000);
setTimeout(function(){

$('#box').tabs('hideHeader');
console.log('hide');
},30000);
setTimeout(function(){

$('#box').tabs('showHeader');
console.log('show');
},32000);
setTimeout(function(){
$('#box').tabs('update',{tab:$('#update'),option:{Title:'new title'}});
console.log('new title');
},34000);


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值