易截截图软件、单文件、免安装、纯绿色、仅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生成数字、字母随机数

 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', ......

asp.net生成静态页面

ASP.NET生成静态页
核心技术:
HTMLPage文件夹,ModelHTML.htm文件中的ArticleTitle,ArticleContent都是要替换的区域
WriteFile(dr["ArticleTitle"].ToString(), dr["ArticleContent"].ToString(), dr["ID"].ToString());
1.前台
<head runat="server">
<title>ASP.NET生成静态网页</title>
& ......

asp.net中用table表格绑定数据

其实在asp.net中用table表格绑定数据,并不要像在asp中那么麻烦,那么难理解,也不要用什么循环语句来一项项的读取数据,然后填充表格.asp.net中有一个叫做Repeater的控件,我们可以直接把表格嵌入到Repeater控件中,然后设置Repeate控件的DataSource属性并让其DataBind()就OK了......
做一个测试:
我创建的SQL数据库如下: ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号