Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
191
rated 0 times [  195] [ 4]  / answers: 1 / hits: 68293  / 12 Years ago, fri, june 8, 2012, 12:00:00

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



var blank = document.createElement( );
div.appendChild(blank);

More From » javascript

 Answers
19

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



div.innerHTML += ' ';


or



div.innerHTML += ' ';


for the HTML entity.


[#85048] Thursday, June 7, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bryonk

Total Points: 161
Total Questions: 116
Total Answers: 107

Location: Albania
Member since Sun, Nov 22, 2020
4 Years ago
bryonk questions
;