1. 现在的日期时间命令是
以下是引用片段:
<%=now%> 即可
each item request.From("input"))
repomse.write item &"<br>"
next
%>
也可用" for each x in tewuest.From"重复取得所有字段的输入值。
2.ASP取得表格(from)数据输入的方法,是使用一个内置的对象(object)—Requect,它以get,post而异。
3.若要自己用VB或其它语言编写,.dll文件供ASP使用需将DLL文件注册方可:DOS下输入 regsbr32 *.dll。
4.显示五个重复的句子,字体越来越大。
以下是引用片段:
<% for i=1 to 5 %>
<font size=<% =i %> color=#00ffff>
快速ASP
</font>
<br>
<% next %>
5.传送字符串到用户端
response.write string
以下是引用片段:
如:<% response.write "Welcome" %>
6.链接到指定的URL地址
response.redirect url
以下是引用片段:
如:<% response.redirect "homepage.asp">
*但是如果此.ASP的文件内容已经传送到用户断,则再用redirect时会发生错误。
7.其他语言与ASP的结合:
以下是引用片段:
如:早上显示早安,下午显示你好
<%
if time>+#12:00:00 AM# and time<#12:00:00 PM #
then
greeting="早安!"
else
greeting="你好!"
end if
%>
<%=greeting %>
8. <script>标记在ASP中的应用
以下是引用片段:
例:
<html>
<body>
<% call function1 %>
</body>
</html>
<script runat=server language=javascript>
function function1()
{
...
}
</script>
9.#include 包括其它文件
<!--#include virtual|file="filename"-->
virtual指虚拟的文件地址。
file 代表绝对的文件地址。
如:
以下是引用片段:
<!--#include virtual="/booksamp/test.asp"-->
<!--#include file="/test/test.asp"-->
而且可以层层嵌套。另外#include 不能在<%--%>之内。
10.ASP取得表格输入数据的方法:GET POST
一.get:用户端将数据加到URL后,格式为”?字段1=输入数据1&字段2=输入数据2&...",再将其送到服务器。
如: actionwww.abc.com, 字段Name输入数据为jack,字段age的数据为15。

