<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>温馨提示</title>
<style>
.trips {
width: 400px;
text-align: center;
border: 1px solid #ddd;
border-radius: 5px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.trips h4 {
height: 35px;
line-height: 35px;
margin: 0;
padding: 0;
background: #f5f5f5;
border-bottom: 1px solid #ddd;
border-radius: 5px 5px 0 0;
}
</style>
</head>
<body>
<div class="trips">
<h4>温馨提示</h4>
<p>当前页面不存在!</p>
<p style="font-size: 13px;"><i id="time" style="color: #f00; font-style: normal;">5</i> 秒后自动关闭页面</p>
</div>
<script type="text/javascript">
window.setInterval("countDown()", 1000);
function countDown() {
var time = document.getElementById("time");
if (time.innerHTML == 0) {
window.close()
} else {
time.innerHTML = time.innerHTML - 1;
}
}
</script>
</body>
</html>
以上是编程学习网小编为您介绍的“当前页面错误,5秒钟自动关闭当前页面”的全面内容,想了解更多关于 前端知识 内容,请继续关注编程基础学习网。
编程基础网
本文标题为:当前页面错误,5秒钟自动关闭当前页面
基础教程推荐
猜你喜欢
- css实现流程导航效果(三种方法) 2024-01-16
- javascript 防止刷新,后退,关闭 2023-11-30
- javascript 简单抽屉效果的实现代码 2024-02-08
- AJAX分页效果简单实现 2023-02-13
- 用CSS实现的图片透明度链接效果代码 2024-02-07
- 纯CSS解决H5布局中的吸顶吸底的实现步骤 2023-12-21
- Echarts教程之通过Ajax实现动态加载折线图的方法 2023-02-14
- httpclient模拟登陆具体实现(使用js设置cookie) 2024-01-12
- 单页面微信分享(html+vue) 2023-10-27
- Jquery判断IE6等浏览器的代码 2023-12-27
