经典的asp把字符串放在双引号中

问题描述 投票:1回答:3
remitclient2 = Replace(remitclient2 ,"class=" Chr(34) & ls & chr(34) ">", "^")

我想用class="ls">取代^

在经典的asp我尝试了转义序列,在上面我使用了chr(34)

Microsoft VBScript compilation error '800a03ee' Expected ')' /US_Offer_2014/lasttry.asp, line 35 remitclient2 = Replace(remitclient2 ,"class=" Chr(34) & ls & chr(34) ">", "^")
asp-classic
3个回答
1
投票
remitclient2 = Replace(remitclient2 ,"class=""ls"">", "^")

您可以通过将字符串中的引号加倍来快速轻松地完成此操作。如果您需要在字符串的开头或结尾处引用,请记住也包括外引号,如下所示:

"abc""def" - quote in the middle
"""abcdef" - quote at the beginning
"abcdef""" - quote at the end

0
投票

我想你只是缺少几个&s:

 remitclient2 = Replace(remitclient2 ,"class=" & Chr(34) & ls & chr(34) & ">", "^")

0
投票
remitclient2 = Replace(remitclient2 ,"class=""ls"">", "^")

答案我试过,得到了

© www.soinside.com 2019 - 2024. All rights reserved.