VBScript Len 函数

定义和用法

Len 函数可返回字符串中字符的数目。

语法

Len(string|varname)
参数 描述
string 字符串表达式。
varname 变量名称。

本在线速查手册由www.w§3§x§u§e.com提供,请勿盗用!

实例

例子 1

dim txt
txt="This is a beautiful day!"
document.write(Len(txt))

输出:

24

例子 2

document.write(Len("This is a beautiful day!"))

输出:

24