多选项卡测试
用ie的开发人员工具看了下iframe的地址是a的,但是内容确显示的是b的。。
ie增加onbeforeunload事件,清空content属性指定的容器的内容就行了。
$(document).ready(function () { CW = document.documentElement.clientWidth; //CH = $("body").height() - $("#programeBody").height() - $("#bottom").height(); CH = document.documentElement.clientHeight - $("#programeBody").height() - $("#bottom").height(); //定义选项卡类 $(".programeObject").each(function (i) { PM[this.id] = new Class_programe_menu($(this)); }); $(".programeButton").click(function () { PM[$(this).attr("to")].CL_addPrograme($(this)); //屏蔽A元素的链接事件 return false; });///////////// if (document.all) window.onbeforeunload = function () { for (attr in PM) $('#'+PM[attr].CL_content).empty(); } });
谢谢版主大人!解决方案如您所说!另外昨天帖子里忘说测试是在IE8中
关闭浏览器或者刷新页面触发的事件平时用的比较少,所以很少关注到这类事件的功能,这次受教了。
从另一方面考虑该问题,IE对于iframe的存在应该会记录iframe所指向的页面,但无法理解的是iframe重载出现的时候却自动加载页面关闭前iframe所呈现(缓存)的网页。IE技术人员就该问题的处理有点让人匪夷所思啊 呵呵
稍后结贴