I have constructed a table, and I have a bunch of data to send to the webpage. How do I define where I want to put each data in each cell of the table.
for example.
Here are two commands in my parse_val function.
I got the value from a C file, and parse it.
The next command tells where to put the value; it is after "Mode:".
__________________________________________________ ___
hvac_value[0] = parsed[0];
mode.innerHTML = "<h1>Mode: "+hvac_value[0]+"</h1>";
__________________________________________________ ___
But now I have a table.
It is written in this way:
<th scope="row"><p>Results </p>
</th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
.......
In each row, there are a bunch of cells. I want to put different values in each of the empty data.
As there is nothing in each cell now; and each cell have <td></td> in front and behind.
I don't know how I can define where I want to put each data.
Is there anyone can help me with this?
Hi,
May be you can use this way:
<th scope="row"><p>Results </p></th><td><div id="result_1"> </div></td><td><div id="result_2"> </div></td><td><div id="result_3"> </div></td>
result_1.innerHTML = parsed[0];result_2.innerHTML = parsed[1];result_3.innerHTML = parsed[2];