Ciao!
Stavo facendo una funzione a dir poco banale ma mi sono impantanato su un problema... Inizio a postare il codice:
Ho il problema che funziona solo su IE8 in visualizzazione compatibilità... Su chrome, opera e firefox e ie9 non funziona... Quindi (se su ie8 vis. comp. funziona) penso sia un problema di compatibilità...codice:function somma (cosa) { tot = 15; p1 = parseInt (document.getElementById("a1").value); p2 = parseInt (document.getElementById("a2").value); p3 = parseInt (document.getElementById("a3").value); p4 = parseInt (document.getElementById("a4").value); p5 = parseInt (document.getElementById("a5").value); ptot = tot - (p1 + p2 + p3 + p4 + p5); document.getElementById('conteggio').value = ptot; if (ptot > 0) ris = ptot; else if (ptot == 0) ris = '<font style=\'color:green\'>' + ptot + '</font>'; else ris = '<font style=\'color:red\'>' + ptot + '</font>'; document.getElementById('punti').innerHTML = '' + ris; }
come faccio a rendere cross-browser questa funzione? grazie
ps: ho già controllato: i nomi dei div sono giusti, ecc...![]()


Rispondi quotando