i want to replace " char to ' with javascript.
thank you for your help.
regards
views:
56answers:
3
+6
A:
Use the replace method on the string str you want to replace it in:
str = str.replace(/"/g, "'");
Important is to use a regular expression with the g flag set to replace globally. If you omit that g flag or use a string for the search, you will only replace the first occurrence.
Gumbo
2010-07-26 15:43:36
thank you very much.
Kerberos
2010-07-26 15:54:34
@Kerberos: You’re welcome! And don’t forget to accept an answer (this does also apply to your other questions).
Gumbo
2010-07-26 15:57:17