I have 4 cells. When you click on them, "Text 1" appears in each. I need that when clicking on the cell (c1), the cell (c2) “clicks”. That is, when clicking on (c1), a click on the cell (c2) simultaneously occurred. Thanks in advance for your help!
<head> <script> var current = "Text 1"; function onClick(sender) { if (sender.innerText == "") { sender.innerHTML = current; } } </script> </head> <body> <table border="1" cellpadding="50px;"> <tbody> <tr> <td id="c1" class="cell" onclick="onClick(this);"></td> <td id="c2" class="cell" onclick="onClick(this);"></td> </tr> <tr> <td id="c3" class="cell" onclick="onClick(this);"></td> <td id="c4" class="cell" onclick="onClick(this);"></td> </tr> </tbody> </table> </body>
c2? And when you click onc3? And when you click onc4? - Alexey Shimanskyc1to click onc2, it’s one thing, and if you’ve supposed to click onc2so thatc4is clicked, that’s completely different. That is, you can make a decision based on the million ITUs that you assign to the cells, and you can make a decision based on a common line, or a common root in the form of atable- Alexey Shimansky