好吧,我很不好意思问这个问题,但我在经典 ASP 中的字符串中转义单引号时遇到了麻烦。我尝试过使用 chr(39)
但这并不能解决问题。
我不是 ASP 经典或 JScript 爱好者,甚至在它过时时还没有开始编码。
这是字符串(它们是):
arrStory[136]['Short'] = 'At the end of May, the group's European partners.';
最佳答案
我相信 JScript 中的语音标记是可以互换的 - 您应该能够对文字本身使用双语音标记 ("
),同时在其中使用单语音标记。
arrStory[136]["Short"] = "At the end of May, the group's European partners.";
或者尝试加倍...
arrStory[136]['Short'] = 'At the end of May, the group''s European partners.';
______________________________________________________^
关于asp-classic - ASP 经典 - JScript : How to escape a single quote (') in a string,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16983757/