easyui 添加新页面

<script>

function createFrame(url) {
var s = '<iframe name="mainFrame" scrolling="auto" frameborder="0" src="' + url + '" style="width: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,
width: $('#mainPanle').width() - 10,
height: $('#mainPanle').height() - 26
});
} else {
jq('#tabs', top.document).tabs('select', subtitle);
}
}

</script>
posted @ 2018-09-25 10:10  佛陀  阅读(263)  评论(0编辑  收藏  举报