0

I am trying to add a button to my HTML DOM using document.getElementbyid.innerHTML, i put the following code inside my typescript code:

   mainTable = mainTable + "<td>" +
            "<input type=\"image\" src=\"https://d2yvv6a7kcdl71.cloudfront.net/55b8dd0f18cbbb8110875e08/assets/DAF13B00-8126-44E7-BF66-153C7022B022.png\"\n" +
            "  (click)=\"imageClicked()\"></td> <td>" +
            " <input type=\"image\" src=\"https://d2yvv6a7kcdl71.cloudfront.net/55b8dd0f18cbbb8110875e08/assets/7F3B475E-4C5F-4C65-8B9F-9901DDDCF8B9.png\"\n" +
            "         (click)=\"imageClicked()\"></td>"

          document.getElementById('mainTable').innerHTML = mainTable;

it is added to the html but nothing happens when i click the image.

Omar Smri
  • 195
  • 1
  • 7

0 Answers0