asp-classic - ASP 经典 - JScript : How to escape a single quote (') in a string

标签 asp-classic escaping jscript

好吧,我很不好意思问这个问题,但我在经典 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/

相关文章:

jquery - JavaScript/PHP/Ajax/Json : securing: Escape user submitted strings before outputting to browser

SQL 在带有变量的存储过程中使用 Unicode N

Golang 中的正则表达式 : How to set character that makes the string not match?

javascript - 动态调用 JS 文件加载到经典的 ASP 应用程序中 - 我们的开发人员想要实现什么目标?

java - 当我将其保存为字符串的一部分时,我希望停止将 < 在 Java 中转换为 <

javascript - 使用 Outlook 通过电子邮件发送临时文件

javascript - 如何制作删除 div 所在位置的按钮?

jscript - 相当于JScript运行时中的窗口

sqlite - 如何在 javascript ASP 中连接 sqlite 数据库

visual-studio - 使用 Visual Studio 2008 管理经典 asp 前端的最佳方法是什么?