JSFiddle - React, Tailwind, and code Playground
HTML
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Company Name</th>
<th>Title</th>
<th>Industry</th>
<th>Country</th>
<th>State</th>
<th>Zip code</th>
<th>Employee</th>
<th>Revenue</th>
<th>SIC</th>
<th>NAICS</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th>Company Name</th>
<th>Title</th>
<th>Industry</th>
<th>Country</th>
<th>State</th>
<th>Zip code</th>
<th>Employee</th>
<th>Revenue</th>
<th>SIC</th>
<th>NAICS</th>
</tr>
</tfoot>
</table>
JavaScript
var response = {"draw":1,"iTotalRecords":1,"iTotalDisplayRecords":1,"aaData":[{"ID":1731166,"INDUSTRY":"3545 Cutting Tools Machine Tool Accessory & Precision Measuring Device Mfg","COMPANYNAME":"Curran Manufacturing Corp","TITLE":"President","NAICS":null,"SICCODES":"3545"}]};
//this code is from ( send.php )
<script type="text/javascript">
function showUser()
{
var state = document.getElementById('state').value;
if (state=="")
{
document.getElementById("example1").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//function test();
var a = xmlhttp.responseText;
alert(a);
document.getElementById("example1").innerHTML=xmlhttp.responseText;
document.getElementById("loading").innerHTML = ''; // Hide the image after the response from the server
}
}
document.getElementById("loading").innerHTML = '<img src="35.gif" />';
xmlhttp.open("GET","getuser.php?state="+state+,true);
xmlhttp.send();
}