Sprawdzałem różne metody z internetu, natomiast nie bardzo chcą one działać, albo zwyczajnie ich nie rozumiem
Mógłbym poprosić o podpowiedź?
<script type="text/javascript"> function clicked(photoid){ var divcolor = document.getElementById(photoid.toString()).style.backgroundColor; if (divcolor == "white"){ document.getElementById(photoid.toString()).style.backgroundColor = 'red'; document.write (red); } else document.getElementById(photoid.toString()).style.backgroundColor = 'white'; document.write (white); } </script>