测试中发现下面这个HTML单独运行时可以正确close,但是当其他页面跳转过来,则不能正确关闭。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>欢迎再次使用</title>
<style>
body{
background: url("img/exit_bg.jpg") no-repeat;
height:100%;
width:100%;
overflow: hidden;
background-size:cover;
}
#exitDiv{
width:100%;
height:100%;
line-height: 300px;
text-align: center;
font-family: arial;
font-size: 40px;
color: Orange;
}
#tipDiv{
text-align: center;
color: OrangeRed;
}
</style>
<script type="text/javascript">
var start;
var timeCount = 3;
function exitFun(){
console.log(timeCount);
if(timeCount <= 0){
console.log("yes");
window.close();
console.log("关闭了!");
}
document.getElementById("tip").innerText &#