设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 编程开发 >> 网络编程 >> ASP教程 >> 通过实例讲解来学习ASP中的函数
精品推荐
ASP教程点击TOP10
·用ASP查看数据库记录的代码
·ASP讲座之六:ASP与数据库(一)
·ASP教程:UrlRewrite 使用参考文档
·十天学会ASP之第一天
·十天学会ASP之第二天
·ASP去掉字符串头尾连续回车和空格的Function
·ASP六大对象介绍
·ASP讲座之一:网页开发利器:高效易学的ASP
·简单熟悉掌握ASP的语法和变量
·ASP使用的去掉字符串头尾连续回车和空格的函数
网络编程点击TOP10
·ASP.NET 程序中常用的三十三种代码
·CHK文件恢复工具
·.NET 初 级 读 本
·c#操作word表格
·『原创』C#中TreeView类操作全攻略:建立树,新增节点,删除节点,修改节点,拖动节点,与Oracle数据库交互操作(一)
·我的.NET书架 (入门篇)
·从零开始学ASP.NET(基础篇)
·用C#实现木马程序
·十天学会ASP.net之第一天
·官方水晶报表 .NET 应用程序实例下载 (C#、Visual C++.NET)
精选专题

通过实例讲解来学习ASP中的函数

作者: 来源:http://www.xgdown.com/ 时间:2007-8-1 12:53:19

通过实例讲解来学习ASP中的函数(4)   语法: Left(string, length)
  说明:

<%
strTest =   "This is a test!"
response.write Left(strTest, 3)
%>

结果: Thi

Len()

作用: 返回字符串的长度.
  语法: Len(string varName)
  说明:

<%
strTest =   "This is a test!"
response.write Len(strTest)
%>

结果: 15

LTrim()

作用: 去掉字符串左边的空格.
  语法: LTrim(string)
  说明:

<%
strTest =   " This is a test!"
response.write LTrim(strTest)
%>

结果: This is a test!

Mid()

作用: 返回特定长度的字符串(从start开始,长度为length).
  语法: Mid(string, start [, length >)
  说明:

<%
strTest =   "This is a test! Today is Monday."
response.write Mid(strTest, 17, 5)
%>

结果: Today

Minute()

作用: 返回时间的分钏.
  语法: Minute(time)
  说明:

<%=Minute(#12:45:32 PM#)%>

结果: 45

Month()

作用: 返回日期.
  语法: Month(date)
  说明: date is any valid date expression.

<%=Month(#08/04/99#)%>

结果: 8

MonthName()

作用: Returns a string identifying the specified month.
  语法: MonthName(month, [, Abb >)
   说明: month is the numeric representation for a given month; Abb (optional) is a boolean value used to display month abbreviation. True will display the abbreviated month name and False (default) will not show the abbreviation.

<%=MonthName(Month(#08/04/99#))%>

结果: August

Now()

作用: Returns the current system date and time.返回当前系统时间
  语法: Now()
  说明: None

<%=Now%>

结果: 8/4/99 9:30:16 AM

Replace()

作用: Returns a string in which a specified sub-string has been replaced with another substring a specified number of times.
  语法: Replace(strToBeSearched, strSearchFor, strReplaceWith [, start [, count [, compare >>>)
   说明: strToBeSearched is a string expression containing a sub-string to be replaced; strSearchFor is the string expression to search for within strToBeSearched; strReplaceWith is the string expression to replace sub-string strSearchFor; start (optional) is the numeric character position to begin search; count (optional) is a value indicating the comparision constant.  

共6页 9 7 [1] [2] [3] [4] [5] [68 :>

通过实例讲解来学习ASP中的函数 相关文章:
通过实例讲解来学习ASP中的函数 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com