How can I insert a character entity like   into a document from Javascript ?
In : Uncategorized, Posted by admin on Mar.03, 2009
If you want to insert a non-breaking space you can insert it using the
charactor code. Like this:
var nbsp = document.createTextNode( "\u00A0" ); referenceToWhereYouWantIt.appendChild( nbsp );
The url above is to the complete ECMA Spec.
Tags : javascript
Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment