I have an html component that makes a variable amount of rows in a table. Inside this component there are several css classes e.g
<div class="row" style="margin-left:0">
How do I embed this big chunk of html in a javascript forloop? The only way I know how is to use document.write(“”) but the quotation marks in the classes will mess that up.
UPDATE:
Any ideas why the tags and everything inside them is ignored when using innerHTML??
Make a div with an id of
someDiv(or whatever you want) for this to work.I used single quotes to wrap the string in order to avoid conflict with the double quotes in the HTML.