返回数字的绝对值。 Math.abs(number) 必选项number 参数是要需要计算绝对值的数值表达式。 说明 返回的值是 number 参数的绝对值。 示例 下面的例子演示了abs 方法的用法。 function ComparePosNegVal(n) { var s; var v1 = Math.abs(n); var v2 = Math.abs(-n); if (v1 == v2) s = n + 和 s += -n + 的绝对值是相同的。;

Posted at 09-05-06 by 佚名 views(5)

function IsValidEmail(email) dim names, name, i, c ''Check for valid syntax in an email address. IsValidEmail = true names = Split(email, @) if UBound(names) 1 then IsValidEmail = false exit function end if for each name in names if Len(name) = 0 the

Posted at 09-05-06 by 佚名 views(5)

function htmlencode(str) on error resume next dim result dim l if isnull(str) then htmlencode= exit function end if l=len(str) result= dim i for i = 1 to l select case mid(str,i,1) case result=result+lt; case result=result+gt;

Posted at 09-05-06 by 佚名 views(2)

dim WINNT_CHINESE WINNT_CHINESE = (len(论坛)=2) function strLength(str) ON ERROR RESUME NEXT if WINNT_CHINESE then dim l,t,c dim i l=len(str) t=l for i=1 to l c=asc(mid(str,i,1)) if c0 then c=c+65536 if c255 then t=t+1 end

Posted at 09-05-06 by 佚名 views(9)

VBScript5中增加了许多新功能,最振奋人心的当属类和正则表达式的出现。以下是本人写的一个解析html代码的类。我是 学php的,语法有不习惯的地方,请大家多包含。 % Class HTMLParse '' 设置 Initialize 事件。 Private Sub Class_Initialize myGlobal = True myIgnoreCase = True End Sub Property Let Global(g) Dim regE

Posted at 09-05-06 by 佚名 views(18)

hawkfly 发表于2000-11-8 17:43:55 ASP地带以下代码只是刚刚写完,未做优化,具体可参照CHINAASP论坛TOP10修改 % @ LANGUAGE=VBSCRIPT % % OPTION EXPLICIT % !--#include file=DataConn.asp-- !--#include file=FuncSet.asp-- % dim rs,sql,IDa,IDb,s,RegUser,a,b,c Set rs=Server.CreateObject(ADO

Posted at 09-05-06 by 佚名 views(3)

【Batman】 于 99-10-26 下午 06:55:06 加贴在 CHINAASP Joy ASP RS技术的一个具体例子 在前面的帖子中,我介绍了RS的基本工作原理,显然如果将RS技术运用在一个 网站的设计中将会有很多非凡的作用(尤其是它的那个最大的优点,可以在不刷新 页面的情况下调用服务端的代码)。正是因为这个特点,你就可以象在编写一个 传

Posted at 09-05-06 by 佚名 views(1)

(选自:ASP区,作者:dalu_ok (大鲁),时间:2000年09月23日) 数组数据排序的程序例子 % ''''*** build example array to show that this thing can sort ''''*** alpha-numeric arrays Dim MyArray MyArray = Array(1,5,shawn,says,hello2m骺噃嶤123,12,98) MyArray = Sort(MyArray) For I = 0 to U

Posted at 09-05-06 by 佚名 views(3)
Copyright © 2008 qcode.org All Rights Reserved 编程开发 由朝夕网络维护