الكود عبارة عن event handler يقوم بوضع صح في مجموعة من checkbox اذا كانت حالة الCHECKBOC في الHEADER هي checked الكود يعمل على ie لكن لا يعمل على فير فوكس .
function checkBoxChanged(row,element)
{
if (element.checked)
{
row.style.backgroundColor='#eefae6';
}
else
{
row.style.backgroundColor='#ffffff';
}
}
function HeaderCheck(box,table)
{
if (box.checked)
for (var i=0;i<table.rows.length;i++)
{
table.rows.cells[0].childNodes[0].checked=true;
table.rows.style.backgroundColor='#eefae6';
}
else
for (var i=0;i<table.rows.length;i++)
{
table.rows.cells[0].childNodes[0].checked=false;
table.rows.style.backgroundColor='#ffffff';
}
}وفي حدث onclick لل check box استدعي الدالة .
