I have this code but the img.onclick
isn't functioning and couldn't figure out what's the reason. Could someone give me some advice? Thanks
var img = document.createElement('img');
img.src = "images/tv.jpg";
img.width = "280";
img.height = "200";
img.onclick = function () {
window.location.href = "~/HEMS/EditDevice.cshtml";
}
...............
cell.appendChild(img);`