|
Q37 How do I embed single and double quotes within a string?
irt.org | Knowledge Base | JavaScript | Text | Q37 [ previous next ]
Q37 How do I embed single and double quotes within a string?
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?'
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.