var tabcount = $('#tabs').tabs('tabs ').length; Modify the addTab method as: function addTab(subtitle, url, icon) {
var tabcount = $('#tabs').tabs('tabs').length;
if (tabcount < ;= 5) {
if (!$('#tabs').tabs('exists', subtitle)) {
$('#tabs').tabs('add', {
title: subtitle,
content: createFrame(url),
closable: true,
icon: icon
});
} else {
$('#tabs'). tabs('select', subtitle);
$('#mm-refresh').click();
}
} else {
alert('You have opened too many, please Close unused windows! ');
return false;
}
The maximum number allowed to be opened is 5 (excluding the welcome page). Can be modified as needed
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn