在获取字符串时,用trim清理下前后的空格,对程序开发人员是个好习惯。
使用方法:
password=trim(request("password"))
dim txttxt=" This is a beautiful day! "
document.write(Trim(txt))
输出:"This is a beautiful day!"
asp网站制作 LTrim 函数
LTrim 函数可返回不带前导空格 (LTrim)的字符串
dim txttxt=" This is a beautiful day! "
document.write(LTrim(txt))
输出:"This is a beautiful day! "
asp网站制作 rtrim
RTrim 属性可返回不带后续空格 (RTrim)的字符串
dim txttxt=" This is a beautiful day! "
document.write(RTrim(txt))
输出:" This is a beautiful day!"