Let inputVal=$(" # inputReservation "). Val ();
$. Ajax ({
Url:/yard/query_like_reservation,
Type: "GET",
Data: {
InputVal: inputVal
},
DataType: "json",
Success: the function (res) {
$(" # all_reservation "). The empty ();
Let tbodyObj=document. GetElementsByTagName (' tbody ');
for (let i=0; i
Let newTd=` & lt; td> The ${res [I] [' ApptNum]} & lt;/td>
Delete & lt;/a> -->
Edit & lt;/a>
`;
NewTr. InnerHTML=newTd;
TbodyObj [0]. The appendChild (newTr);
}
}
})
}
CodePudding user response:
Whether because of getElementsByTagName total return to the first, try to use getElementByID complains,,,,CodePudding user response:
Had changed to the getElementsByName