VBScript Trim function
Trim function to remove spaces around the string.
Tip: See LTrim and RTrim function.
grammar
Trim(string)
参数 | 描述 |
---|---|
string | 必需。字符串表达式。 |
Examples
Examples
<script type="text/vbscript">
fname=" Jack "
document.write("Hello" & Trim(fname) & "and welcome.")
</script>
fname=" Jack "
document.write("Hello" & Trim(fname) & "and welcome.")
</script>
Examples of the above output:
HelloJackand welcome.
try it"
Complete VBScript Reference