"Striped table 3.0"
Bootstrap 3.0.0 Snippet by innovationLab

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row col-md-6 col-md-offset-2 custyle"> <table id="tableDiv" class="table table-striped custab"> <tr> <th>Domain</th> </tr> <tr> <td>www.facebook.com</td> <td class="text-center"><INPUT class='btn btn-info btn-xs' TYPE=BUTTON OnClick="Circle_calc(this.form);" VALUE="Login"></td> </tr> </table> </div> </div>
.custab{ border: 1px solid #ccc; padding: 5px; margin: 5% 0; box-shadow: 3px 3px 2px #ccc; transition: 0.5s; } .custab:hover{ box-shadow: 3px 3px 0px transparent; transition: 0.5s; }
var domains = '{ "domains" : [' + '{ "domainName":"www.facebook.com" },' + '{ "domainName":"www.twitter.com" },' + '{ "domainName":"www.googleplus.com" },' + '{ "domainName":"www.google.com" },' + '{ "domainName":"www.google.com"} ]}'; function parseData(){ var obj = JSON.parse(domains); var newTable,startTag,endTag; //Creating a new table startTag="<TABLE id='tableDiv' class=\"table table-striped custab\"><tr><th>Domain</th></tr>" endTag="</TABLE>" newTable=startTag; var trContents; for(i=0;i<obj.domains.length;i++){ newTable+="<tr><td style=\"WIDTH: 120px\">" + obj.domains[i].domainName +c"</td>" + "</tr>"; } newTable+=endTag; document.getElementById('tableDiv').innerHTML=newTable; } window.onload = function () { parseData(); }

Related: See More


Questions / Comments: