Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quotations

Status
Not open for further replies.

codeone

Programmer
Joined
Mar 25, 2003
Messages
343
Location
US
<a onClick=&quot;insertTag ( 'tsttxt', 'quotations here', false )&quot;>


Hello I would like to place quotation marks were it says 'quotations here', but when I do the script wont work, how would I go about doing such a thing?


Thanks

Code One
 
in JS you can have strings enclosed within single quotes ' or double quotes &quot;

var singleQuote = 'this string uses single quotes'
var doubleQuote = &quot;this string uses double quotes&quot;

When you want to have a quote or double quote within a string you can use the slash character to include it.

var singleQuote = 'the cat\'s craddle.'
var doubleQuote = &quot;the French say \&quot;bonsoir\&quot;.&quot;

I hope this helps. Gary Haran
==========================
 
Status
Not open for further replies.

Similar threads

Replies
1
Views
66
Replies
5
Views
237

Part and Inventory Search

Sponsor

Back
Top