易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET中网页倒计时代码

打开一个网页,上面显示5秒钟以后跳转到其他网页,每过一秒,它就会改变(4秒钟以后跳转,3秒钟以后跳转。。。)
<!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>
<title>Demo</title>
<script type="text/javascript">
var intervalID = 0;
var leftSeconds = 5;
function beginTimer()
{
loopTimerId = setInterval( timerStep, 1000 );
}
function timerStep()
{
if( leftSeconds > 1 )
{
leftSeconds --;
document.getElementById( "spTest" ).innerHTML = leftSeconds.toString() + "秒钟以后跳转到其他网页";
}
else
{
clearInterval( intervalID );
window.location.href = "newPage.aspx";
}
}
</script>
</head>
<body onload="beginTimer()">
<div>
<span id="spTest">5秒钟以后跳转到其他网页</span>
</div>
</body>
</html>


相关文档:

ASP.NET页生命周期概述

ASP.NET页生命周期的定义,有以下8个方面:页请求,开始,页初始化,页加载,验证,回发事件,呈现,卸载。
ASP.NET 页运行时,此页将经历一个生命周期,在生命周期中将执行一系列处理步骤。这些步骤包括初始化、实例化控件、还原和维护状态、运行事件处理程序代码以及进行呈现。了解页的生命周期非常重要,这样就能在合适 ......

asp.net连接sql用的SqlHelper

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Collections;
using System.Data.SqlClient;
namespace DAL
{
    /// <summary>
    /// 数据库的通用访问代码
    /// 此类为抽象类,不允许实例化,在应用 ......

ASP.NET Web Developer Checklist




The following is a simple checklist you can use when building web
applications.  Much of this still applies to other technologies and can
easily be extended.  I try not to get too specific on technology or
methodology, but it is definitely leaning toward ASP.NET.
If you
......

asp.net生成数字、字母随机数

 char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号