Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q37 How do I embed single and double quotes within a string?

You are here: irt.org | FAQ | JavaScript | Text | Q37 [ previous next ]

One of the following methods should let you do what you want:

<script language="JavaScript"><!--
var text = "singe quote - ' - example<br>";
document.write(text);
var text = 'double quote - " - example<br>';
document.write(text);
var text = "single and double - \' - \" example<br>";
document.write(text);
var text = 'another single and double - \' - \" example<br>';
document.write(text);
//--></script>

Feedback on 'Q37 How do I embed single and double quotes within a string?'

©2018 Martin Webb