标签: jquery
如何转义撇号等字符的内容?
以下a:包含对字符串文字的阻塞
$('a:contains('\This'is choking on the apostrophe\')....
答案 0 :(得分:14)
你可以试试这个:
$('a:contains("This isn\'t choking on the apostrophe")')
或者这个:
$("a:contains('This isn\'t choking on the apostrophe')")