Ver Mensaje Individual
  #11 (permalink)  
Antiguo 18/02/2006, 15:58
Avatar de Cap.Buscapina
Cap.Buscapina
 
Fecha de Ingreso: octubre-2004
Ubicación: Argentina
Mensajes: 836
Antigüedad: 20 años, 5 meses
Puntos: 4
lo pongo nuevamente todo para que hagas solo copy&paste:

<html>
<head>

<title>prueba</title>
<script type="text/javascript">
function muestra(){
var total=50;
var texto1="aqui texto 1";
var texto2="aqui texto 2";
var texto3="aqui texto 3";
var texto4="aqui texto 4";
var texto5="aqui texto 5";
var texto6="aqui texto 6";

document.getElementById('m6').innerHTML="";
document.getElementById('m5').innerHTML="";
document.getElementById('m4').innerHTML="";
document.getElementById('m3').innerHTML="";
document.getElementById('m2').innerHTML="";
document.getElementById('m1').innerHTML="";

if(total==0){
document.getElementById('m1').innerHTML=texto1;
}else{
if(total>0 && total<=119){
document.getElementById('m2').innerHTML=texto2;
}else{
if(total>120 && total<=209){
document.getElementById('m3').innerHTML=texto3;
}else{
if(total>210 && total<=279){
document.getElementById('m4').innerHTML=texto4;
}else{
if(total>280 && total<=319){
document.getElementById('m5').innerHTML=texto5;
}else{
if(total>320 && total<=360){
document.getElementById('m6').innerHTML=texto6;
}else{
alert("no funciona");
}
}
}

}
}
}
}
</script>
</head>
<body>
<form>
<input name="muetralo" type="button" onClick="muestra()" value="mostrar">

</form>
<table>
<tr>
<td id="m1"></td>
</tr>
<tr>
<td id="m2"></td>
</tr>
<tr>
<td id="m3"></td>
</tr>
<tr>
<td id="m4"></td>
</tr>
<tr>
<td id="m5"></td>
</tr>
<tr>
<td id="m6"></td>
</tr>
</table>
</body>
</html>



solo el problema eran las } (llaves en mi jerga), el resto creo que todo bien.

suerte
__________________
by Capitán Buscapina
.