按时发达水电费

function createFrame(url) {
var s = '<iframe name="mainFrame" scrolling="auto" frameborder="0" src="' + url + '" style="100%;height:100%;"></iframe>';
return s;
}

function addTab(subtitle, url) {
var jq = top.jQuery;
if (!jq('#tabs', top.document).tabs('exists', subtitle)) {
jq('#tabs', top.document).tabs('add', {
title: subtitle,
content: createFrame(url),
closable: true,
$('#mainPanle').width() - 10,
height: $('#mainPanle').height() - 26
});
} else {
jq('#tabs', top.document).tabs('select', subtitle);
var selTab = jq('#tabs', top.document).tabs('getSelected');
jq('#tabs', top.document).tabs('update', {
tab: selTab,
options: {
content: createFrame(url)
}
})
}
}
原文地址:https://www.cnblogs.com/Alan2016/p/9714222.html