页面定时跳转一个 html 示例 是js 做的,求高手指教
2013-03-15 15:40
323 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="author" content="钟艳明,962589149" />
<title>reload</title>
<script type="text/javascript">
function timerGo(obj)
{
alert("该网址已经更新为http://www.baidu.com,系统5秒内自动跳转该页面");
togetDown(5);
//clearTimeout(togetDown());
}
function togetDown(misc){
document.getElementById("tiao").innerHTML=misc;
if(--misc>0){
setTimeout("togetDown("+misc+");",1000);
}else
{
window.location.href="http://www.baidu.com";
}
}
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF33CC}
.STYLE3 {font-size: 50px}
.STYLE4 {font-size: 24px}
-->
</style>
</head>
<body onload="timerGo(this);">
<center>
<span class="STYLE3">还剩 </span>
<div class="STYLE1" id="tiao" style="border:#CCCCCC solid 1px; width:300px; height:200px; font-size:200px; font-weight:bold; text-align:center;">0</div>
<p><span class="STYLE3">秒,跳转到<a href="http://www.baidu.com">http://www.baidu.com </a> </span> </p>
<p class="STYLE4">如果页面未自动跳转,请点击
<a href="http://www.baidu.com">http://www.baidu.com</a> 进行跳转 </p>
</center>
</body>
</html>
很遗憾的是,不知道如何让DIV 有种动态的感觉。求高手指点,在线等
类似进度条一样的 最好了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="author" content="钟艳明,962589149" />
<title>reload</title>
<script type="text/javascript">
function timerGo(obj)
{
alert("该网址已经更新为http://www.baidu.com,系统5秒内自动跳转该页面");
togetDown(5);
//clearTimeout(togetDown());
}
function togetDown(misc){
document.getElementById("tiao").innerHTML=misc;
if(--misc>0){
setTimeout("togetDown("+misc+");",1000);
}else
{
window.location.href="http://www.baidu.com";
}
}
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF33CC}
.STYLE3 {font-size: 50px}
.STYLE4 {font-size: 24px}
-->
</style>
</head>
<body onload="timerGo(this);">
<center>
<span class="STYLE3">还剩 </span>
<div class="STYLE1" id="tiao" style="border:#CCCCCC solid 1px; width:300px; height:200px; font-size:200px; font-weight:bold; text-align:center;">0</div>
<p><span class="STYLE3">秒,跳转到<a href="http://www.baidu.com">http://www.baidu.com </a> </span> </p>
<p class="STYLE4">如果页面未自动跳转,请点击
<a href="http://www.baidu.com">http://www.baidu.com</a> 进行跳转 </p>
</center>
</body>
</html>
很遗憾的是,不知道如何让DIV 有种动态的感觉。求高手指点,在线等
类似进度条一样的 最好了
相关文章推荐
- js实现页面跳转,纯html实现网页定时跳转
- js实现页面跳转,纯html实现网页定时跳转
- 跳转页面,定时 (html+jsp+js)
- 在一个页面文件中(JSP 或者HTML)使用href 跳转另一个页面时使用Js中获取传递过来的参数
- html js打开一个新的页面
- HTML 重定向 ----定时跳转刷新页面
- 【HTML】【JS】JS实现页面跳转方式汇总
- 使用HTML写一个简单的跳转登录页面
- JS定时刷新页面及跳转页面
- html跳转到同一个页面的不同位置
- JS定时刷新页面及跳转页面
- HTML+CSS+JS - 5秒钟之后跳转页面
- js,html-点击直接跳转到页面底/顶部
- 页面定时跳转的扩展 使用JS完成读秒的效果
- js函数在window.location.href跳转页面传参由于空格引发的一个小问题
- 通过js判断访问请求来路进行页面跳转的示例
- html 中js 跳转页面
- JS定时刷新页面及跳转页面
- 页面定时跳转【JS】
- HTML页面定时跳转