rasputin
Lounge-Member
ich ändere die bgfarbe einer zelle folgendermassen:
function over(src)
{
src.style.backgroundColor = "#CCFFFF";
src.style.fontWeight = "600";
}
function out(src)
{
src.style.backgroundColor = "#FFFFFF";
src.style.fontWeight = "normal";
}
<td onmouseover="over(this)" onmouseout="out(this)">Text</td>
ich habe mehrere solcher zellen und möchte die farbe zusätzlich bei onclick in hellgrün (#CCFF00)ändern, so dass sie beim nächsten onclick auf eine andere zelle weiss wird und die andere die farbe ändert!
function over(src)
{
src.style.backgroundColor = "#CCFFFF";
src.style.fontWeight = "600";
}
function out(src)
{
src.style.backgroundColor = "#FFFFFF";
src.style.fontWeight = "normal";
}
<td onmouseover="over(this)" onmouseout="out(this)">Text</td>
ich habe mehrere solcher zellen und möchte die farbe zusätzlich bei onclick in hellgrün (#CCFF00)ändern, so dass sie beim nächsten onclick auf eine andere zelle weiss wird und die andere die farbe ändert!