JQuery中easyui获取tab页对象以及获取tab页对象下的iframe对象和指定tab页对象隐藏

$('#mytabs').tabs( {
  onSelect : function() {
  var tab = $('#mytabs').tabs('getSelected');
           zgoto(tab.panel('options').title);

           var finaTab=$('#mytabs').tabs('getTab','财务信息').panel('options').tab;
           finaTab.hide();//tab页对象隐藏
           var tbId = tab.attr("id");  
           //获取tab的iframe对象  
              var tbIframe = $("#"+tbId+" iframe:first-child");
            tbIframe.attr('src', '.www.baidu.com');  

}
});




var reload = "";
function zgoto(tabname) {
var tabid = "";
if (tabname == "标的简况") {
tabid = "pro"
reload = "";
}
//………………
var tmpurl = 'www.baidu.com';
document.getElementById(tabid).src = tmpurl;

}






<div id="mytabs" style="margin-top: 10px;">
<div title="标的简况" id="proDiv">
<iframe frameborder="0" id="pro" width="100%" height="650"
scrolling="No" frameborder="0"></iframe>
</div>

<div title="财务信息" id="finaDiv">
<iframe frameborder="0" id="fina" height="1000" width="100%"
scrolling="No" frameborder="0"></iframe>
</div>
<div title="组织结构" id="orgDiv">
<iframe frameborder="0" id="org" height="1000" width="100%"
scrolling="No" frameborder="0"></iframe>
</div>
<div title="企业信息" id="compDiv">
<iframe frameborder="0" id="comp" height="1000" width="100%"
scrolling="No" frameborder="0"></iframe>
</div>
<div title="详细信息" id="detailDiv">
<iframe frameborder="0" id="detail" height="1000" width="100%"
scrolling="No" frameborder="0"></iframe>
</div>
</div>

你可能感兴趣的:(easyui获取tab页对象,tab页的onSelect使用,指定tab页对象隐藏)