Originariamente inviato da Mich_
Attenzione.
In un form non ci possono essere dei campi di nome uguale;
in un documento non ci possono essere elementi con lo stesso id.
Modificare lo sfondo di una riga di tabella e` possibile, tramite i CSS:
document.getElementById('NOME').style.backgroundCo lor = "red";
Per informazioni piu` specifiche, dovresti postare un pezzetto di codice.
Ciao
Michele
Eccoti quello che ho fatto per adesso:
codice:<html> <head> <title>Nuova pagina 1</title> <script> function test(cc,ff) { if (cc.checked!=true) {clearall(ff)} else {checkall(ff)} } function checkall(ff) { for (var i=0; i<ff.elements.length; i++) { if (ff.elements[i].type=="checkbox" && ff.elements[i].name!="ALL") { ff.elements[i].checked = true; } } } function clearall(ff) { for (var i=0; i<ff.elements.length; i++) { if (ff.elements[i].type=="checkbox" && ff.elements[i].name!="ALL") { ff.elements[i].checked = false; } } } </script> </head> <body> <form name="prova"> <input type="button" value="check all checkboxes" onClick="checkall(this.form);"> <input type="button" value="clear all checkboxes" onClick="clearall(this.form);"> <table border="0" cellpadding="0" cellspacing="0" width="50%"> <tr> <td width="25%" bgcolor="#000080"><font color="#FFFFFF"><input type="checkbox" name="ALL" onClick="test(this,this.form);"></font></td> <td width="25%" bgcolor="#000080"><font color="#FFFFFF">Cognome</font></td> <td width="25%" bgcolor="#000080"><font color="#FFFFFF">Nome</font></td> <td width="25%" bgcolor="#000080"><font color="#FFFFFF">Cellulare</font></td> </tr> <tr> <td width="25%" bgcolor="#0099FF"><input type="checkbox" name="CB1"></td> <td width="25%" bgcolor="#0099FF">Pinco</td> <td width="25%" bgcolor="#0099FF">Pallino</td> <td width="25%" bgcolor="#0099FF">333/1234567</td> </tr> <tr> <td width="25%" bgcolor="#0099FF"><input type="checkbox" name="CB2"></td> <td width="25%" bgcolor="#0099FF">Tal</td> <td width="25%" bgcolor="#0099FF">De Tali</td> <td width="25%" bgcolor="#0099FF">333/1234567</td> </tr> <tr> <td width="25%" bgcolor="#0099FF"><input type="checkbox" name="CB3"></td> <td width="25%" bgcolor="#0099FF">Caio</td> <td width="25%" bgcolor="#0099FF">Sempronio</td> <td width="25%" bgcolor="#0099FF">333/1234567</td> </tr> </table> </form> </body> </html>

Rispondi quotando