iframe导致的文本框无法聚焦

很多人都认为是ie本身的bug。是由于iframe没有移除,即使移除了。内存上也没有清除造成的。解决方法是在tb_remove()中先手动移除iframe然后,在强制做垃圾回收

 
代码如下:
 
function tb_remove() {
var seq=PopSeq();
$("#TB_imageOff"+seq).unbind("click");
$("#TB_closeWindowButton" + seq).unbind("click");
 
$("#TB_window" + seq).fadeOut("fast", function() {
///手动移除ifrmae,IE的一个bug
$('#TB_iframeContent' + seq).remove();
$('#TB_window' + seq + ',#TB_overlay' + seq + ',#TB_HideSelect' + seq).trigger("unload").unbind().remove();
///自己调用垃圾回收,强制清楚iframe内存,解决文本框无法输入问题。
CollectGarbage();
});
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
$("body","html").css({height: "auto", "auto"});
$("html").css("overflow","");
}
document.onkeydown = "";
document.onkeyup = "";
return false;
原文地址:https://www.cnblogs.com/puream/p/2839335.html