
var i=${labelIndex}
var tr_model = '<tr class="hover edit">'+
'<td class="w48"><input type="checkbox" class="isadd" /></td>'+
'<td class="w48 listorder"><input type="text" name="labelList[key].listorder" value="0" /></td>'+
'<td class="w270 name"><input type="text" name="labelList[key].name" value="" /></td>'+
'<td class="w150 align-center"><a onclick="remove_tr($(this))" href="JavaScript:void(0)">移除</a></td>'+
'</tr>'
$("#add_type").click(function(){
$('#tr_model >tr:last').after(tr_model.replace(/key/g,i))
addLabelRule($('#tr_model >tr:last'))
i++
$('#labelCount').val($('#tr_model tr').length - 1)
})
function addTab(){$('#tt').tabs('add',{
title:'New Tab ' ,
content:'Tab Body ' ,
iconCls:'icon-save',
closable:true,
tools:[{
// iconCls:'icon-mini-refresh',
handler:function(){
alert('add')
}
}]
})
}
function ClickEvent() {var title = $(this).text()//选项卡名称
//拼接一个Iframe标签,选项卡内容
var str = '<iframe id="frmWork" width="100%" height="100%" frameborder="0" scrolling="auto" src="' + $(this).attr("src") + '"></iframe>'
//首先判断用户是否已经单击了此项,如果单击了直接获取焦点,否则打开
var isExist = $("#tab").tabs('exists', title)
if (!isExist) {
//添加tab的节点,调用easyUITab标签的方法
$("#tab").tabs('add', {
title: title,
content: str,
iconCls: 'icon-save',
closable: true
})
}
else {
//如果存在则获取焦点
$("#worktab").tabs('select', title)
}
})
}
在用到的地方调用这个函数
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)