In my php script it is generated using echo javascript, as well as a lot of pictures using the img tag. Each picture has its own ID.
I need in javascript on ID to get the coordinates of the image generated from php. How can I do it?
So my pictures are generated in php:
foreach($files as $str){ echo '<tr>'; echo "<td><tr><img onclick='javascript:imgclick($ii)' id = '$ii' src='http://clroyale.ru/wp-content/plugins/royale/cards/$str'></img></tr></td>"; echo '</tr>'; $ii = $ii + 1; }