0
How to break line in javascript
I want to break line in an array and write it by innerText but it is not working either with \n or <br/> but when I use document.write it work. I want to use innerText please tell me how to do it.
5 Respuestas
+ 5
Charchit Dahiya Pls use the search bar to avoid duplicates.
Check these threads:
https://www.sololearn.com/Discuss/784866/?ref=apphttps://www.sololearn.com/Discuss/2416293/?ref=apphttps://www.sololearn.com/Discuss/2578727/?ref=app
+ 2
As you mentioned here that <br /> tags is not working with innerText
Let's take a revision
InnerText is use to change text of selected content
While
InnerHtml is used of change or add html to that content
Hope it will solve your problem
If not edit your post and add the code for better understanding for us
Happy coding ☺️
0
My problem is not listed here.
0
Vivek thanks a lot. It worked