代码如下: $(document).ready(function(){ $('#tabs').tabs({add:addEventHandler}); //给tabs块绑定addEventHandler事件 $('#newtabs').click(addTab); }) var tabCounter = 1; function addTab(){ if(tabCounter 6){ alert('tabs can not more than 6!'); return; } $('div'+'New tab'+tabCounter+'/div').appendTo('#tabs'); $('#tabs').tabs("add","#new-tab-"+tabCounter,'New tab'+tabC...[ 查看全文 ]