SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: dumb JS ?
-
Jun 27, 2001, 12:04 #1
- Join Date
- Jun 2001
- Location
- alternate dementian
- Posts
- 399
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
dumb JS ?
does java script have an escape character?
for example, say i want to pass a string that contains O'brian
-
Jun 27, 2001, 12:17 #2
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Did you try O\'brien? That should work or just enclose the string in double quotes
Code:<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.
-
Jun 27, 2001, 12:36 #3
- Join Date
- Jun 2001
- Location
- alternate dementian
- Posts
- 399
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i was confused until i checked my mail (forums stripped out the backslash) i'll try that thanks
Bookmarks