Doğru Cevap
-
<script type="text/javascript"> function RenkVer(div, renk) { if (div.indexOf('1') == -1) { document.getElementById(div).style.backgroundColor = renk; document.getElementById(div + '1').style.backgroundColor = renk; } else { document.getElementById(div).style.backgroundColor = renk; document.getElementById(div.replace('1','')).style.backgroundColor = renk; } } </script> <span id="x" onmouseover="RenkVer(this.id,'#FFFF00')" onmouseout="RenkVer(this.id,'')">AAA</span> <span id="y" onmouseover="RenkVer(this.id,'#990033')" onmouseout="RenkVer(this.id,'')">BBB</span> <span id="z" onmouseover="RenkVer(this.id,'#996600')" onmouseout="RenkVer(this.id,'')">CCC</span> <p> <span id="x1" onmouseover="RenkVer(this.id,'#FFFF00')" onmouseout="RenkVer(this.id,'')">aaa</span> <span id="y1" onmouseover="RenkVer(this.id,'#FFFF00')" onmouseout="RenkVer(this.id,'')">bbb</span> <span id="z1" onmouseover="RenkVer(this.id,'#FFFF00')" onmouseout="RenkVer(this.id,'')">ccc</span> </p>
Cevaplar
Hiç cevap bulunamadı.