当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP 实例

ASP
ASP 介绍
ASP Install
ASP 语法
ASP 变量
ASP Procedures
ASP Forms
ASP Cookies
ASP Session
ASP Application
ASP #include
ASP Global.asa
ASP Send e-mail
ASP Response
ASP Request
ASP Application
ASP Session
ASP Server
ASP Error
ASP FileSystem
ASP TextStream

ASP 实例


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 714 ::
收藏到网摘: n/a

Basic 基础

Write text using ASP
使用ASP写一段文字
Format text with HTML tags
配合HTML标签来格式化文字

Variables 变量

Create a variable
建立变量
Create an array
建立数组
Looping through HTML headers
循环HTML的标题元素(h1,h2,h3,h4,h5,h6)
Time-based greeting using VBScript
使用VBScript来写一个基于时间的问候
Time-based greeting using JavaScript
用JavaScript来写类似的问候

Date/Time 函数 (VBScript)

Date and time
日期与时间
Get the name of a day
获取日期
Get the name of a month
获取月份
Get todays' day and month
获取今天的的日期和月份
Countdown to year 2008
倒数到2008年
Calculate the day which is n days from today
从今天起N天之后的日期
Format date and time
格式化日期与时间
Is this a date?
判断是否为日期

其它一些函数 (VBScript)

Uppercase or lowercase a string
小写或大写字符串
Trim a string
清除字符串的空格
How to reverse a string?
让字符串反相
How to round a number?
数字的四舍五入
A random number
随机数字
Return a specified number of characters from left/right of a string
定向返回(左/右)指定数量的字符
Replace some characters in a string
替换字符串中的一些字符
Return a specified number of characters from a string
从字符串中返回指定数量的字符串

Procedures

Call a procedure using VBScript in ASP
在ASP中使用VBScript调用程序
Call a procedure using JavaScript in ASP
在ASP中使用JavaScript调用程序
Call a JavaScript procedure and a VBScript procedure using VBScript in ASP
在ASP中使用VBScript同时调用JS程序和VBS程序

表单

Interact with a user in a form that uses the "get" method
使用表单的"get"方法来产生与用户的互动
Interact with a user in a form that uses the "post" method
使用表单的"post"方法来产生与用户的互动
Interact with a user in a  form with radio buttons
使用表单的单选按钮来与用户产生互动

Cookies

Create a welcome cookie
创建一个欢迎用的cookie

Response 对象

Write text using ASP
使用ASP来写段文字
Format text with HTML tags
利用HTML标签来格式化文字
Redirect the user to another URL
让用户转移到另一个URL上
Random links
随机链接
Controlling the buffer
控制缓冲
Clear the buffer
清除缓冲
End a script in the middle of processing
结束处于进程中的脚本
Set how many minutes a page will be cached in a browser before it expires
设置页面的缓存经过多少分钟后过期
Set a date/time when a page cached in a browser will expire
设置页面缓存过期的日期/时间
Check if the user is still connected
检查用户是否依然处于连接状态
Set the type of content
设置连接类型
Set the name of character set
设置字符编码

Request 对象

Send extra information within a link
通过链接发送额外的信息
A QueryString collection in its simplest use
QueryString集合最简单的使用
How to use information from forms
怎样使用来自表单的信息
More information from a form
来自表单的更多信息
A form collection in its simplest use
表单集合最简单的用法
How to use information from forms
来自表单信息的用法
More information from a form
来自表单的更多信息
A form with radio buttons
带有单选按钮的表单
A form with checkboxes
带有复选按钮的表单
How to find the visitors' browser type, IP address and more
如何知道访问者的浏览器类型,IP地址,等等
List all servervariables you can ask for
列举所有你能获取到的服务器变量值
Welcome cookie
欢迎用的cookie
Total number of bytes the user sent
用户发送的信息有多少字节

Session 对象

Return session id number for a user
针对某个用户返回session数
Get a session's timeout
获取session的空闲等待时间

Server 对象

When was a file last modified?
文件最后一次改动的时间?
Open a textfile for reading
打开文本文件进行阅读
Home made hit counter
页面访问数

FileSystem 对象

Does a specified file exist?
指定的文件是否存在?
Does a specified folder exist?
指定的目录是否存在?
Does a specified drive exist?
指定的盘符是否存在?
Get the name of a specified drive
获取指定盘符的名称
Get the name of the parent folder of a specified path
获取指定路径的父级目录
Get the file extension
过去文件扩展名
Get the base name of a file or folder
获取文件或是文件夹的基名

TextStream 对象

Read textfile
读取文本文件
Read only a part of a textfile
读取文本文件的一部分
Read one line of a textfile
读取文本文件的一行
Read all lines from a textfile
读取文本文件所有行的内容
Skip a part of a textfile
跳过文本文件的部分内容
Skip a line of a textfile
跳过文本文件的一行内容
Return current line-number in a text file
返回文本文件当前行的行数
Get column number of the current character in a text file
获取当前字符在文本文件中的列数

Drive 对象

Get the available space of a specified drive
获取指定硬盘的有效空间
Get the free space of a specified drive
获取指定硬盘的空闲空间
Get the total size of a specified drive
获取指定硬盘总共空间大小
Get the drive letter of a specified drive
获取指定硬盘的符号
Get the drive type of a specified drive
获取指定硬盘的类型
Get the file system of a specified drive
获取指定硬盘的文件系统
Is the drive ready?
硬盘是否准备完毕?
Get the path of a specified drive
获取指定硬盘的路径
Get the root folder of a specified drive
获取指定硬盘的根目录
Get the serialnumber of a specified drive
获取指定硬盘的序列号

File 对象

When was the file created?
文件是什么时候建立的?
When was the file last modified?
文件最后一次改动的时间?
When was the file last accessed?
最后一次访问的时间?
Return the attributes of a specified file
返回指定文件的属性

Dictionary 对象

Does a specified key exist?
指定的键值是否存在?
Return an array of all items
返回所有项目的数组
Return an array of all keys
返回所有键的数组
Return the value of an item
返回所有项目的值
Set a key
设置一个键
Return the number of key/item pairs
返回关联数

AdRotator

Display a different image each time a user visits a page
每次用户访问一张页面时会显示不同的图片
Display a different image each time a user visits a page + the images are links
每次显示不同的带连接的图片

Browser Capabilities

Find the type, capabilities, and version of each browser that visits your site
得到访问你站点的每个不同浏览器的型号,功能以及版本

ContentRotator

Display a different content each time a user visits a page (ASP 3.0)
每当用户访问一个页面时会显示不同的内容(ASP3.0)

Content Linking

Build a table of contents
建立内容表
Navigate between pages in a text file
在文本文件中实现分页

评论 (0) All

登陆 | 还没注册?