现在的位置: 首页 > 综合 > 正文

打开新窗口关闭当前页面不弹出关闭提示js代码

2013年02月20日 ⁄ 综合 ⁄ 共 316字 ⁄ 字号 评论关闭

复制代码 代码如下:
<script type="text/javascript">
function closeIt() {
window.opener = '';
window.open('http://www.baidu.com');
window.open('', '_self');
window.close();
}
self.setInterval("newTime()", 1000)
var t = 4;
function newTime() {
if (t > 0) {
t = t - 1;
document.getElementById("txtTime").value = t
}
else if (t <= 0) {
closeIt();
}
else {
closeIt();
}
}
</script>

抱歉!评论已关闭.