Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
169
rated 0 times [  175] [ 6]  / answers: 1 / hits: 148988  / 15 Years ago, wed, february 3, 2010, 12:00:00

Just a string. Add ' to it every time there is a single quote.


More From » jquery

 Answers
121

replace works for the first quote, so you need a tiny regular expression:



str = str.replace(/'/g, \');

[#97670] Sunday, January 31, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cristian

Total Points: 132
Total Questions: 98
Total Answers: 98

Location: Guam
Member since Tue, Nov 29, 2022
1 Year ago
;