我有Kendo TabStrip,我添加了这样的新标签
tabStrip.append({
text: name + " <button data-type='remove' class='k-button k-button-icon' onClick='closeTab($(this).closest(\"li\"));'><span class='k-icon k-i-close'></span></button>",
encoded: false,
contentUrl: "/Info/Index?id=" + id
});
如何为此标签设置ID?
答案 0 :(得分:2)
在追加后,设置id属性:
tabStrip.tabGroup.children().last().attr("id", "myId" + tabsLength);