动态网页ASP语言基础(2)
创建一个简单的ASP页面
在服务器端编写的文件 index.asp :
以下为引用内容:
<%@LANGUAGE="JSCRIPT" CODEPAGE="65001"%>
<!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=utf-8" />
<title>第一个简单页面</title>
</head>
<body>
我们对学好ASP语言<br/>
<% for(i=1;i<8;i++){ %>
非常
<br/>
<% } %>
有信心!
</body>
</html>
在浏览器地址栏中键入:http://localhost/index.asp 可以看到如下的运行结果:
我们对学好ASP语言
非常
非常
非常
非常
非常
非常
非常
有信心!
运行结果的源文件信息:
以下为引用内容:
<!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=utf-8" />
<title>第一个简单页面</title>
</head>
<body>
我们对学好ASP语言<br/>
非常
<br/>
非常
<br/>
非常
<br/>
非常
<br/>
非常
<br/>
非常
<br/>
非常
<br/>
有信心!
</body>
</html>
本文链接:http://www.oversteper.com/wprogram/asp/814.html
相关文档:
这段代码的功能是:将一个数组打乱顺序,显示出来,让每一次显示的顺序都不一样。
<%
Dim tt
tt=Split("1,2,3,4,5,6",",")
'随机排序
leng=UBound(tt)
randomize
for ii=0 to leng-1
b=int(rnd()*leng)
temp=tt(b)
tt(b ......
很简单的教程,献给喜欢SEO的朋友们。把http://www.***.cn/article.asp?logID=26 替换成http://www.***.cn/article.asp?/a26.html。不需要通过iis+ISAPI_Rewrite做基于IIS的url rewrite
一、数据库很简单使用ACCESS,Data.mdb建立一个表Article,三个字段:ID,Title,Content;自动编号、标题、文章内容。
二、Config. ......
编写过程
过程是一组能执行指定任务且具有返回值的脚本命令。您可以定义自己的过程,然后在脚本中反复调用它们。
您可以将过程定义放在调用过程的 .asp 文件中,也可以将通用过程放在一个共享的 .asp 文件中,然后用 SSI #include 指令将其包含进其他调用其过程的 .asp 文件中。您还可选择另一种方法,即把这些功能打包 ......
本文转自:http://hi.baidu.com/viewhainan/blog/item/663d68605e7de942ebf8f80a.html
GetRows()方法
是将数据从 Recordset 复制到二维数组中,这是一个二维数组,第一个下标标识字段,第二个则标识记录号,所以 rsArray = rs.GetRows() rsArray(0, 0)就表示记录集第一行的第一字段值 rsArray(1, 0)就 ......
先看看ASP.NET页面刷新的实现方法:
第一:
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } 第二:
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.locatio ......