Nick LaMarca Nick LaMarca - 10 months ago 88
Javascript Question

Create A Blank Html Space On The Fly Javascript

How do I create a blank space on the fly using javascript?
The following is not working for me..

var blank = document.createElement(" ");

Answer Source

If you really just want to append a space character, use the following:

div.innerHTML += ' ';


div.innerHTML += ' ';

for the HTML entity.