Issues to be addressed:
For example, when I first opened the administrative area page, I turned on the Product Type Management page, and then I added a data to the product type management, and when I clicked on the Horizontal Administrative Area tab, I needed to use the data added to the product type management post, but there was no data in the administrative area. I wanted this data to show up, so I thought that when I clicked on the Horizontal tab, I wanted to refresh the page. Then the data will be displayed.
The main thing is I have no idea what I click on the Horizontal tab to trigger the event. The code is as follows:
Html
tab
<div data-options= "region: ' Center ', collapsible:false" > <div id= "maintabs" class= "Easyui-tabs"
data-options= "Fit:true,narrow:true" >
<div title= "Home" style= "Overflow:hidden;" data-options= "IconCls: ' FA Fa-home ' ">
<div id=" Myclock "style=" margin:0 auto;width:400px; "class=" clock "></div>
</ div>
</div>
</div>
Js
To add a horizontal tab
function AddTab (title, URL) {
if ($ (' #mainTabs '). Tabs (' exists ', title) {
$ (' #mainTabs '). Tabs (' select ', title );
} else {
var content = ' <iframe scrolling= ' auto ' frameborder= ' 0 ' src= ' + url+ ' "style= ' width:100%;height:99%;" ></iframe> ';
$ (' #mainTabs '). Tabs (' Add ', {
title:title,
content:content,
closable:true,
cache:true,
});
}
Click on the Left tab
function Clicktree (node) {
if ($). Tree (' isleaf ', Node.target)) {
AddTab (Node.text, Node.attributes.url);
} else {
$ (this). Tree (' Toggle ', node.target);
}
The problem is solved!
Idea: The main thing is to click on the Horizontal tab, reload the data.
function addtab (title, URL) {if ($ (' #mainTabs '). Tabs (' exists ', title)) {$ (' #mainTabs '). T
ABS (' select ', title); else {var content = ' <iframe scrolling= ' auto ' frameborder= ' 0 ' src= ' + url+ ' "style= ' width:100%;height:99%;"
></iframe> ';
$ (' #mainTabs '). Tabs (' Add ', {title:title, content:content, Closable:true, Cache:true,});
}} function Clicktree (node) {if ($). Tree (' isleaf ', Node.target)) {AddTab (Node.text, Node.attributes.url); /* Get the Horizontal tab/var content = ' <iframe scrolling= ' auto ' frameborder= ' 0 ' src= ' + node.attributes.url+ ' "style=" width:100 %;height:99%; "
></iframe> '; $ (' #mainTabs '). Tabs ({onselect:function (title) {var Currtab = $ (' #mainTabs '). Tabs (' Gettab ', title,
Node.attributes.url);
var iframe = $ (currtab.panel (' Options '). Content);
var src =iframe.attr (' src ');
$ (' #mainTabs '). Tabs (' Update ', {options: {title:title, HREF:SRC}});
}
});
} else {$ (this). Tree (' Toggle ', node.target);}
Screenshot of Effect:
Open Product type and base product page first
Add data to a product type
Add data to the base product
I want the effect to reach!
Main code:
var content = ' <iframe scrolling= "auto" frameborder= "0" src= "' + node.attributes.url+ '" style= "width:100%;height:99% ;" ></iframe> ';
$ (' #mainTabs '). Tabs ({
onselect:function (title) {
var currtab = $ (' #mainTabs '). Tabs (' Gettab ', title, Node.attributes.url);
var iframe = $ (currtab.panel (' Options '). content);
var src =iframe.attr (' src ');
$ (' #mainTabs '). Tabs (' Update ', {
options: {
title:title,
href:src
}
});
}
);
The above is small set to introduce the JQuery easyui tab tab Problem Summary, 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!