+ 3
Adding a line Break into JS
This is my code here I’ve tried adding a \n into it but it doesn’t add a line break. I’ve also tried <br/> with no luck: var i = 0; var txt = "Welcome : Made by Ole113"; var speed = 70; function typeWriter() { if (i < txt.length) { document.getElementById("demo").innerHTML += txt.charAt(i); i++; setTimeout(typeWriter, speed); } }
2 Réponses
+ 11
Use this CSS property
body {
word-break:break-all;
}
+ 5
I have doing like that and it didn't work.
I have tried a crazy idea
open my code below, go to js section, search a commented code in line 139 to 194.
not for advertising
https://code.sololearn.com/WH3xv416vBM9/?ref=app