Line breaks in Javascript?

+1 Jeff Gong · September 13, 2015
How would I put in a line break using Javascript

Post a Reply

Replies

Oldest  Newest  Rating
0 Brotsky Tv · September 14, 2015
hey there !

Try this :

You should create new 
<br>

 tag each time when you will append it, something like


linebreak = document.createElement("br");
queryForm.appendChild(linebreak);


For more Javascript tutorials: https://www.brotsky.tv/category/javascript/
0 Jay Deshaun · September 14, 2015
or you could also use '\n' for new line
0 Jeff Gong · September 15, 2015
thanks
0 Jay Deshaun · September 19, 2015
No problem
  • 1

Javascript

107,354 followers
About

A scripting language that is added to standard HTML to create interactive effects, apps, games for the browser.

Links
Moderators