$('#tabs').tabs('add',{
title:subtitle,
content:createFrame(url),
closable:true,
width:$('#mainPanle').width()-10,
height:$('#mainPanle').height()-26
});
function createFrame(url)
{
alert('create');
var s = '<iframe name="mainFrame" scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>';
return s;
}
在IE中会发送两次请求 到后台;
是1.3.1版本的bug
$("#tabs").tabs("add", {
title : subtitle,
closable : true,
selected : true,
cache : true,
width:$('#mainPanle').width()-10,
height:$('#mainPanle').height()-26
});
var str = '<iframe name="mainFrame" scrolling="auto" frameborder="0" src="'+url+'"></iframe>';
var index = $("#tabs").tabs("getTabIndex", $("#tabs").tabs("getTab", subtitle));
alert(str);
$("#tabs").find(".tabs-panels .panel:eq("+ index +") div").html(str);
先创建一个空的panel 再填充就好
本文介绍了一个关于使用EasyUI的Tabs组件时出现的在IE浏览器下加载IFrame导致重复请求的问题及解决方案。该问题源于EasyUI 1.3.1版本的一个已知bug。文中提供了一种通过先创建空面板再填充内容的方式来规避此问题的方法。
254

被折叠的 条评论
为什么被折叠?



