Ver Mensaje Individual
  #11 (permalink)  
Antiguo 31/07/2008, 11:38
Rockzilla
 
Fecha de Ingreso: julio-2008
Mensajes: 129
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: Problema de representacion de porcentaje con color

jajajaja gracias pana de verdad son bueno asi quedo
<SCRIPT language=JavaScript>


function perc1() {
a = document.form1.a.value/100;
b = a*40;
document.form1.total1.value = 40
}
function perc2() {
a = document.form1.c.value;
b = 40;
c = a/40;
d = c*100;
// f = d + x
document.form1.total2.value = d
//var x = Math.random()
//document.write(x)
//x = new String (x)
//x = x.substring(x.length -1)
//document.write(x)
if (d <=45){ document.bgColor='red'}
else {
if (d <=75){ document.bgColor='yellow'}
else {
if (d <= 100){ document.bgColor='green'}
//yellowgreen
//
}

}










}

{

}

//-->
</SCRIPT>