thickbox关闭时自动刷新父页

date:星期一, 九月 28th, 2009 at 11:32 下午 Categories:web

thickbox 确实很好用啊
尤其是我这种美工差的。。
可以做一个简单的页面。。
用上THICKBOX 只显示这一个部分就OK 了

关闭是自动刷新父窗口
比如我用在投票,留言,发表后 点关闭 直接刷新。马上看到新内容
function tb_remove() {
$(“#TB_imageOff”).unbind(“click”);
$(“#TB_closeWindowButton”).unbind(“click”);
$(“#TB_window”).fadeOut(“fast”,function(){$(‘#TB_window,#TB_overlay,#TB_HideSelect’).trigger(“unload”).unbind().remove();});
$(“#TB_load”).remove();
if (typeof document.body.style.maxHeight == “undefined”) {//if IE 6
$(“body”,”html”).css({height: “auto”, width: “auto”});
$(“html”).css(“overflow”,”");
}
window.location.reload();
document.onkeydown = “”;
document.onkeyup = “”;
return false;
}

window.location.reload();

中间加上这个就OK 了

如果闲他影响速度
自己去掉

One Response to “thickbox关闭时自动刷新父页”

  1. sacs à mainNo Gravatar

    很好用呀 谢谢哦

    [Reply]

Leave a Reply