首页 > 代码库 > easyUI树形节点点击和动态添加Tab

easyUI树形节点点击和动态添加Tab

var index = 0;              function addPanel(url,title){                  if(!$(‘#tt‘).tabs(‘exists‘, title)){                      $(‘#tt‘).tabs(‘add‘,{                          title: title,                          content: ‘<iframe src="http://www.mamicode.com/‘+url+‘" frameBorder="0" border="0"  style="width: 100%; height: 100%;"/>‘,                          closable: true                      });                  }else{                      $(‘#tabs‘).tabs(‘select‘, title);                  }              }              function removePanel(){                  var tab = $(‘#tt‘).tabs(‘getSelected‘);                  if (tab){                      var index = $(‘#tt‘).tabs(‘getTabIndex‘, tab);                      $(‘#tt‘).tabs(‘close‘, index);                  }              }  

easyUI树形节点点击和动态添加Tab