anyone know how to make that <br/> work as a tag?, appears like string | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

anyone know how to make that <br/> work as a tag?, appears like string

in my last code "simple game Rock, paper or scissors The Tag <br/> appears like string, how i made that <br\> work as a Tag?

25th Feb 2017, 11:09 PM
Francisco García Solís
Francisco García Solís - avatar
4 Answers
+ 2
Actually the problem is line 73 of your js <br/> is being made as a text node. It should be it's own element. Try replacing line 73 with this: var br = document.createElement("br"); p.appendChild(br); var node = document.createTextNode(result2);
25th Feb 2017, 11:42 PM
ChaoticDawg
ChaoticDawg - avatar
+ 2
thanks i do that, And i Was see that i was using The same variables for both results (result And result 2), now works correctly, thanks :)
25th Feb 2017, 11:57 PM
Francisco García Solís
Francisco García Solís - avatar
+ 1
You have an error in your html or js this is why it isn't displaying properly. Looking at it, you need to put quotes around your id values too. id="div" etc
25th Feb 2017, 11:28 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
oooooo thaks, i'll check that :)
25th Feb 2017, 11:40 PM
Francisco García Solís
Francisco García Solís - avatar