Subscribe to
Posts [Atom]


javascript string literal

Monday, October 09, 2006

var aVAR ='"\'<%context%>\'"'


for a literal string to be entered in use this example:

method(\"'+string+'\")

would produce: string

to insert a variable:
obj.setAttribute("onclick", "aFunction(" + i +")"

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home