JSFiddle - React, Tailwind, and code Playground
HTML
Fulls #
<div id="fulls"></div>
Sample #
<div id="sample"></div>
CSS
#fulls
{
background-color:#eee;
height:200px;
width:100%;
}
#sample
{
background-color:#e0e0e0;
height:200px;
width:100%;
}
JavaScript
$("#sample").empty()
$("#fulls").empty()
var table = document.createElement('table');
table.className="report";
var first = table.insertRow(0);
first.className= "headerTable";
var h1 = first.insertCell(0);
var h2 = first.insertCell(1);
var h3 = first.insertCell(2);
var h4 = first.insertCell(3);
var h5 = first.insertCell(4);
h1.className= "headerTable";
h2.className= "headerTable";
h3.className= "headerTable";
h4.className= "headerTable";
h5.className= "headerTable";
h1.innerHTML = ("Speed");
h2.innerHTML = ("RPM");
h3.innerHTML =("Acc");
h4.innerHTML = ("Brake");
h5.innerHTML =("Dated");
for (var i = 0;i<5;i++)
{
var first = table.insertRow((i+1));
first.className= "tableRow";
var h1 = first.insertCell(0);
var h2 = first.insertCell(1);
var h3 = first.insertCell(2);
var h4 = first.insertCell(3);
var h5 = first.insertCell(4);
h1.innerHTML = i;
h2.innerHTML = i;
h3.innerHTML = i;
h4.innerHTML = i;
h5.innerHTML= new Date();
}
$("#fulls").html(table);
$("#sample").html(table);
$("#sample").css("overflow-y","scroll");