-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
35 lines (27 loc) · 986 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function ajax(){
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange=function(){
if(this.readyState==4 && this.status==200){
var response = JSON.parse(this.responseText);
var mlist=response.list;
var tbody = document.getElementById("Tbody");
var trow="";
for(var i=0; i<mlist.length; i++){
trow += `<tr>
<th scope="row">${mlist[i].sNo}</th>
<td>${mlist[i].Name}</td>
<td>${mlist[i].Qnty}</td>
<td>${mlist[i].Unit}</td>
<td>${mlist[i].Type}</td>
<td>${mlist[i].Price}</td>
<td><input class="checkk" type="checkbox" id="checking"> </td>
</tr>`;
}
tbody.innerHTML = trow;
}}
xhttp.open("GET","./list.json",true);
xhttp.send();
}
window.addEventListener("load", ajax);
function strikeon(){
}