打开新窗口关闭当前页面不弹出关闭提示js代码
时间:2021-04-22 09:07:02|栏目:JavaScript代码|点击: 次
复制代码 代码如下:
<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>
栏 目:JavaScript代码
本文地址:http://www.codeinn.net/misctech/106165.html






