+ 1

JavaScript string problem...

How do you "enter" (go to the next line) inside a string with JavaScript?

2nd Dec 2017, 1:54 PM
Sidox
2 Antworten
+ 5
Not sure with your case case 1: var str = "@"+ "B"; That's it or.... var str = "@\ B"; case 2: var str = "@\nB";//for alert box or textarea var str = "@<br>B";//For document.write or usual html element
2nd Dec 2017, 2:18 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 1
Thanks! That helped a lot!!!
3rd Dec 2017, 11:12 AM
Sidox