在JQuery .text()中逃避撇号

时间:2017-06-04 21:09:22

标签: jquery

如何在这行代码中逃避撇号?
使用'只会打印出'而不是' 按照We'd中的撇号走的方式。

$('.ContText-3').text('To find out more about how Lister, Jeter & Lloyd, CPAs can help you grow your business, contact us. We'd be happy to sit down with you, learn about your business, and share how we can help.');

2 个答案:

答案 0 :(得分:1)

$('.ContText-3').text('To find out more about how Lister, Jeter & Lloyd, CPAs can help you grow your business, contact us. We\'d be happy to sit down with you, learn about your business, and share how we can help.');

答案 1 :(得分:1)

$('.ContText-3').text("To find out more about how Lister, Jeter & Lloyd, CPAs can help you grow your business, contact us. We'd be happy to sit down with you, learn about your business, and share how we can help.");