验证字符串为空
2014-08-26来源:

判断一个字符串是否为空是很多程序都要用到的,那该怎样判断呢?

例如:

<%

'**************************************

'文件名: HTML.asp

'描 述:

' 文本存入

'**************************************

dim str

str = request.form("test")

'A、进行字符串的比较

if str="" then

response.write "if str=""""
"

end if

'B、对字符串长度的判断,推荐。

if len(str)=0 then

response.write "if len(str)=0
"

end if

%>

更多信息请查看IT技术专栏

2026上岸·考公考编培训报班

  • 报班类型
  • 姓名
  • 手机号
  • 验证码
推荐信息
Baidu
map