Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72388

Simple Javascript output list to HTML question [closed]

$
0
0

I have Javascript code that generates tickets.

They are separate lists of 6 numbers each.

They start out as arrays.

I'm generating these lists in a script code block above the HTML code. I come out of my JavaScript code block with the following:

ticketList.push(yourTicket);
tl = ticketList.join('</ br>');

and in my HTML:

<div>{tl}</div>

The problem is that my JS code above generates HTML that prints out to my screen like so:

1,7,13,28,33,45</ br>4,7,8,30,31,42</ br>12,21,22,32,35,47

I don't want the br tags displayed on screen.

I want them rendered as HTML.

I tried "<" instead of the arrow tags, no luck.

How do I generate HTML from JS so that my break tags get rendered instead of displayed as text?


Viewing all articles
Browse latest Browse all 72388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>