asp.net倒计时自动跳转指定页面
2016-11-15 22:21
696 查看
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login_tiao.aspx.cs" Inherits="Login_tiao" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>跳转页面</title>
<script type="text/javascript">
var i = 3;//设置跳转的时间
window.onload = function page_cg() {
document.getElementById("time").innerText = i;
i--;
if (i == 0) {
window.location.href='xxxxx.aspx'//跳转到指定页面
}
setTimeout(page_cg, 1000);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<br />
3秒后自动跳到用户信息页面<a href="xxxxx.aspx"></a>...还剩<span id="time" style="font-weight:bold;color: blue"></span>秒!
<br />
</div>
</form>
</body>
</html>
在你之间的Login.aspx.cs中加入
Response.Redirect("Login_tiao.aspx");跳转即可
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>跳转页面</title>
<script type="text/javascript">
var i = 3;//设置跳转的时间
window.onload = function page_cg() {
document.getElementById("time").innerText = i;
i--;
if (i == 0) {
window.location.href='xxxxx.aspx'//跳转到指定页面
}
setTimeout(page_cg, 1000);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<br />
3秒后自动跳到用户信息页面<a href="xxxxx.aspx"></a>...还剩<span id="time" style="font-weight:bold;color: blue"></span>秒!
<br />
</div>
</form>
</body>
</html>
在你之间的Login.aspx.cs中加入
Response.Redirect("Login_tiao.aspx");跳转即可
相关文章推荐
- Asp.net实现网站提示信息页面后的定时自动跳转到指定页面
- asp.net网站首页根据IP自动跳转指定页面的示例
- 一种基于自定义代码的asp.net网站首页根据IP自动跳转指定页面的方法!
- 一种基于自定义代码的asp.net网站首页根据IP自动跳转指定页面的方法!
- asp.net网站首页根据IP自动跳转指定页面的示例
- asp.net中实现倒计时自动跳转页面(运用javascript)
- 一种基于自定义代码的asp.net网站首页根据IP自动跳转指定页面的方法!
- asp.net中倒计时自动跳转页面的实现方法(使用javascript)
- asp.net中倒计时自动跳转页面的实现方法(使用javascript)
- ASP.NET中配合JS实现页面计时(定时)自动跳转
- asp.net如何让未登录用户登录后能自动跳转到登录前访问的页面
- 在asp.net 中 如何在登录成功后2秒内自动跳转到登录前的页面
- asp.net在同一页面跳转到指定位置
- 问题:asp.net 点击button按钮调到页面顶部;结果:asp.net点击一个按钮,使页面跳转到本面页上的指定位置
- ASP.NET中配合JS实现页面计时(定时)自动跳转
- asp.net 实现n秒后页面自动跳转
- 在ASP.NET登录页面中如何实现文本框焦点自动跳转及通过回车键提交表单
- 执行成功倒计时以及自动跳转到指定页面
- ASP.NET制作自动跳转页面
- 全部暂停服务器上的ASP.NET站点,自动跳到指定页面