I have this primitive HTML table -
I need to send JSON from python, such as {"string":"1B"} or {"string":"3A"} etc... which will trigger JS which will change background colour of the corresponding table cell. What's the best approach? I'm sure I would be able to do it if pointed right direction.
First I need to create a JS webserver? I have experience with Flask & Python, but not sure how to do it here. Node.js or something?
Thanks
HTML:
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<table sty>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
</tr>
<tr>
<td>A</td>
<td>A</td>
<td>A</td>
</tr>
<tr>
<td bgcolor="orange">B</td>
<td>B</td>
<td>B</td>
</tr>
</table>
</body>
</html>
CSS:
table, th, td {
border: 1px solid black;
border-collapse: collapse;
width: 150px;
text-align: center;
}