Easyui is a lightweight background management system framework, a variety of components are available, easy to use, now has a free version of the license.
1. Increase the expansion
<script type= "Text/javascript" >
/**
* @author {KEXB} easyui-tab extension is based on the ID switch page
/$.extend ($. Fn.tabs.methods, {
gettabbyid:function (JQ, id) {
var tabs = $.data (jq[0), ' tabs '). Tabs;
for (var i = 0; i < tabs.length i++) {
var tab = tabs[i];
if (Tab.panel (' Options '). id = = ID) {return
tab;
}}
return null;
},
selectbyid:function (JQ, id) {
var tab;
var tabs = $.data (jq[0], ' tabs '). Tabs;
for (var i = 0; i < tabs.length i++) {
tab = tabs[i];
if (Tab.panel (' Options '). id = = ID) {break
;
}
}
if (tab!= undefined) {
var curtabindex = $ ("#tabs"). Tabs ("Gettabindex", tab);
$ (' #tabs '). Tabs (' select ', Curtabindex);
}
,
existsbyid:function (JQ, id) {return
jq.tabs (' Gettabbyid ', id)!= null;
}
};
</script>
2. Click event Open method
function Open (text, URL, id) {
var tabid = replaceall (URL, '/', ');
var h = computgridheight ();
if (url = = "null" | | | url = = "" | | url = = "") {return
;
}
if ($ ("#tabs"). Tabs ("Existsbyid", TabID)) {
$ ("#tabs"). Tabs ("Selectbyid", tabid);
}
else
{
if (Url.indexof ("?") < 0) {
url = "? _menuid=" + ID;
}
else {
URL = = "&_menuid=" + ID;
}
$ (' #tabs '). Tabs (' Add ', {
id:tabid,
title:text,
closable:true,
content:createtabcontent (URL, h),
Url:url
});
}
The above is a small set to introduce the jquery easyui tabs extension based on custom properties to open the page sign, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!