2

アポストロフィなどの文字のコンテンツをエスケープするにはどうすればよいですか?

次の a:contains は、文字列リテラルで窒息しています

$('a:contains('\This'is choking on the apostrophe\')....
4

1 に答える 1

14

これを試すことができます:

$('a:contains("This isn\'t choking on the apostrophe")')

またはこれ:

$("a:contains('This isn\'t choking on the apostrophe')")
于 2012-06-12T16:26:13.190 に答える