How do I write into the html using JavaScript? -


<script> for(var numcols = 1; numcols <= 12; numcols++){     document.write(                         "<div class='row'>" +                         "<div class='well text-center col-lg-" + [numcols] + "'>" + ".col-lg-" + [numcols] + "</div>" +                         "</div>";                      ); } </script> 

i know there's document.write/document.writeln have script , don't know what's wrong. i'm trying visualize bootstrap's col-md-* thing

remove semicolon after last </div>

<script> for(var numcols = 1; numcols <= 12; numcols++){     document.write(                         "<div class='row'>" +                         "<div class='well text-center col-lg-" + [numcols] + "'>" + ".col-lg-" + [numcols] + "</div>" +                         "</div>"                     ); } </script> 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -