Re: block writing



hendedav@xxxxxxxxx a écrit :
I tried, as you suggested, and it didn't work as I thought. The
below is the code:

var element = document.getElementById("divTFooter");
element.appendChild(document.createTextNode("this is an example of a
link: <a href="test.html">link</a>"));

and I got a "missing ) after argument list" error after the quote
right before the test.html name.

With the string delimited by simple quotes instead of double ones :

element.appendChild(document.createTextNode('this is an example of a
link: <a href="test.html">link<\/a>'));


Or escaping the inside double quotes :

element.appendChild(document.createTextNode("this is an example of a
link: <a href=\"test.html\">link<\/a>"));


--
sm
.