make html str

This commit is contained in:
Huang,Yonggang 2024-06-09 16:46:28 +08:00
parent 35393dffe8
commit 4306f991ce
1 changed files with 6 additions and 11 deletions

View File

@ -189,20 +189,15 @@
});
tableHTML += '</tr>';
data.forEach(item => {
alert(item);
tableHTML += `<tr><td>${item}</td>`;
alert(tableHTML);
Object.values(item).forEach(value => {
alert(value);
tableHTML += `<td>${value}</td>`;
alert(tableHTML);
});
for(var task in data){
tableHTML += '<tr><td>' + task +'</td>';
for(var item in data[task]){
tableHTML += '<td>' + data[task][item] + '</td>';
}
tableHTML += '</tr>';
});
}
tableHTML += '</table>';
alert(tableHTML);
return tableHTML;
}
</script>