+ 1

New line in javascript problem .

I hava a java script code like that; var x=10; Var y=13; document.write(x); document.write(y); It outputs 1013 But i want. 10. 13 How can i create new line using javascript. Plz help!

28th Jun 2020, 9:40 AM
Alian Jutt
Alian Jutt - avatar
4 Respuestas
+ 2
You can use document.write("<br/>") to add html line break.
28th Jun 2020, 9:46 AM
Jakub Bittara
Jakub Bittara - avatar
+ 3
Thanks. Jakub Bittara. I was stucked here for many days you helped me a lot. Thanks dear.
28th Jun 2020, 9:50 AM
Alian Jutt
Alian Jutt - avatar
+ 1
Samanvitha P R I tried \n but it didnot worked but br/ tag worked.Thanks dear.
28th Jun 2020, 9:52 AM
Alian Jutt
Alian Jutt - avatar