为什么我的vbCrLf不起作用?

时间:2016-01-20 12:58:56

标签: html vbscript asp-classic

我必须声明一个变量,我需要保留多个句子(vbscript是我正在使用的语言)。所以,我把vbCrLf放在句子的末尾,以便休息一下。但它没有给我休息,而是给了我一整段。

strHtmlBody = "<div><font face='Arial' size='-1'>Greetings "& RS("firstname") &":"& vbCrLf & _ 
        "Here is the email that contains your account information to access your account at www.example.com." & VbCrLf & VbCrLf & _
        "Your Email Address: " & RS("Email") & VbCrLf & _
        "Your Password : " & RS("Password") & VbCrLf & vbCrLf & _
        "Remember, if you have any questions or concerns, please let us know, simply reply to this email." & VbCrLf & _
        "ABC Company" & vbCrLf & _
        "http://www.example.com" & vbCrLf & vbCrLf
strHtmlBody = strHtmlBody & "</div>"

1 个答案:

答案 0 :(得分:0)

HTML忽略vbCrLf代表的大多数空格。在其位置使用<br>标记。

相关问题