Skip to content
Advertisement

not able to access the dynamic id in a table row

JavaScript
JavaScript

Inside a table <td> I have put this code and not able to fetch the id inside the td. Id can not be fetched and not able to pass the id in href.

Advertisement

Answer

Code works if you rename the id to myId. There is likely a window.id that is shadowing your variable

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement