How do u insert a literal such as   in a DOM textnode using javascript? In this code: var sp1_sup = document.createElement("sup"); var sp1_suffix = document.createTextNode(" (" + zno + ")" ); sp1_sup.appendChild(sp1_suffix ); the literal string is printed.. how do I get the textnode to recognize the no break space
Why are you adding parenthesis ?. And what's the value of zno Anyway, if I understood you correctly, you can try with HTML entities: $#32; or $nbsp; (replace '$' by '&').