jquery ui tabs 获取选中 当jquery ui tabs 选项卡初始化之后,在别的操作中我怎么判断当前页面中的那个选项卡选中的是哪一项? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function addTab(id, name, content) { var exists = $('#tb').tabs('exists', name); content = '<iframe id="centerFrame" scrolling="auto" frameborder="0" src="' + content + '" style="width:100%;height:100%;"></iframe>'; if (exists) { $('#tb').tabs('select', name); //获得选中的tab var selectedTab = $('#tb').tabs('getSelected'); //获得原有属性 var titleInfo = selectedTab.panel('options').title; var contenturl = selectedTab.panel('options').content; //刷新原来的标签页面 $('#tb').tabs('update', { tab : selectedTab, fit : true, options : { title : titleInfo, content : content } }); } else { $('#tb').tabs('add', { title : name, index : id, iconCls : 'icon-save', closable : true, content : content, tools : [ { iconCls : 'icon-mini-refresh', handler : function() { } } ] }); }}不懂再问 我已进入到页面的时候就加载了jquery ui tabsfunc_tabs = $('#div_m_l_tab').tabs({ select: function(event, ui) { }},{ selected: 1 });然后经过了一些别的操作之后 我想知道现在这个tabs选中的是选项卡的第几项?用jquery能取出来吗? 试试这样var $tabs = $('#tab').tabs();var selected = $tabs.tabs('option', 'selected'); 不知道楼主有没有看我给你的代码,里面有一句加了注释的//获得选中的tabvar selectedTab = $('#tb').tabs('getSelected');年轻人,不要见到代码多就不看,编程要细心 在le6下面切换标签会加载不出来;原因是给content 赋值不行;有解决方法没有? 你好,我想获取固定的tab 该怎么用?var selectedTab = $('#tab_title').tabs('getTab');var titleInfo = selectedTab.panel('options').title;alert(titleInfo);弹出的是空,求指导啊? 你好,我想获取固定的tab 该怎么用?var selectedTab = $('#tab_title').tabs('getTab');var titleInfo = selectedTab.panel('options').title;alert(titleInfo);弹出的是空,求指导啊?getTab 的方法不是那样写的//获得选中的tabvar selectedTab = $('#tb').tabs('getSelected');这是获得选中的,//获得选中的tabvar selectedTab = $('#tb').tabs('getTab', tab_titles); JSON.stringify格式化数组的问题 求教一个关于Google Map API的问题 怎么用Jquery实现复选框的全部删除 新手入门,请大家帮忙找个错 js清除cookie 出问题 相同方法有的页面行有的不行 动态url传参 ? 这样的js写法有没有产生闭包? document.getElementById相关问题 SwfUpload上传,文件选择框设置 ■请问■ 页面刷新导致javascript里面的数据丢失的问题,如何解决? my97 选择日期之后响应事件 Ext portal 布局不能全屏填充
var exists = $('#tb').tabs('exists', name);
content = '<iframe id="centerFrame" scrolling="auto" frameborder="0" src="' + content
+ '" style="width:100%;height:100%;"></iframe>';
if (exists) {
$('#tb').tabs('select', name);
//获得选中的tab
var selectedTab = $('#tb').tabs('getSelected');
//获得原有属性
var titleInfo = selectedTab.panel('options').title;
var contenturl = selectedTab.panel('options').content;
//刷新原来的标签页面
$('#tb').tabs('update', {
tab : selectedTab,
fit : true,
options : {
title : titleInfo,
content : content
}
});
} else {
$('#tb').tabs('add', {
title : name,
index : id,
iconCls : 'icon-save',
closable : true,
content : content,
tools : [ {
iconCls : 'icon-mini-refresh',
handler : function() { }
} ]
});
}}不懂再问
func_tabs = $('#div_m_l_tab').tabs({
select: function(event, ui) {
}
},{ selected: 1 });
然后经过了一些别的操作之后 我想知道现在这个tabs选中的是选项卡的第几项?用jquery能取出来吗?
var selected = $tabs.tabs('option', 'selected');
var selectedTab = $('#tb').tabs('getSelected');年轻人,不要见到代码多就不看,编程要细心
var selectedTab = $('#tab_title').tabs('getTab');
var titleInfo = selectedTab.panel('options').title;
alert(titleInfo);
弹出的是空,求指导啊?
var selectedTab = $('#tab_title').tabs('getTab');
var titleInfo = selectedTab.panel('options').title;
alert(titleInfo);
弹出的是空,求指导啊?
getTab 的方法不是那样写的//获得选中的tab
var selectedTab = $('#tb').tabs('getSelected');
这是获得选中的,//获得选中的tab
var selectedTab = $('#tb').tabs('getTab', tab_titles);