does java script have an escape character?
for example, say i want to pass a string that contains O'brian
| SitePoint Sponsor |


does java script have an escape character?
for example, say i want to pass a string that contains O'brian





Did you try O\'brien? That should work or just enclose the string in double quotes
orCode:<script language="JavaScript1.2"> <!-- var str = 'Hello Mr O\'Brien'; document.write(str); //--> </script>
Code:<script language="JavaScript1.2"> <!-- var str = "Hello Mr O'Brien"; document.write(str); //--> </script>
Please don't PM me with questions.
Use the forums, that is what they are here for.


i was confused until i checked my mail (forums stripped out the backslash) i'll try that thanks
Bookmarks