Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/12/2008, 10:26
animal121
 
Fecha de Ingreso: octubre-2008
Mensajes: 9
Antigüedad: 16 años, 3 meses
Puntos: 0
Ayuda Donde estoy mal?

<html>
<head>
<title>Prueba de Examen</title>
<script language="JavaScript">
function calcular()
{
form1.prom.value=(eval(form1.i.value)+eval(form1.i i.value)+eval(form1.iii.value))/3;
if(form1.prom.value >= 70)
{
document.all.obc.innerHTML= "Aprovado";
{
else
{
document.all.obc.innerHTML= "Reprobado";
}
form1.promb.value=(eval(form1.ib.value)+eval(form1 .iib.value)+eval(form1.iiib.value))/3;
if(form1.promb.value >= 70)
{
document.all.obcb.innerHTML= "Aprovado";
{
else
{
document.all.obcb.innerHTML= "Reprobado";
}
}
</script>
</head>
<body>
<form name="form1">
<center><table border="1">

<tr>
<td>I Ex</td>
<td>II Ex</td>
<td>III Ex</td>
<td>Promedio</td>
<td>Obcerbaciones</td>
</tr>

<tr>
<td><input type="text" name="i"></td>
<td><input type="text" name="ii"></td>
<td><input type="text" name="iii"></td>
<td><input type="text" name="prom"></td>
<td><div id="obc">&nbsp;</div></td>
</tr>

<tr>
<td><input type="text" name="ib"></td>
<td><input type="text" name="iib"></td>
<td><input type="text" name="iiib"></td>
<td><input type="text" name="promb"></td>
<td><div id="obcb">&nbsp;</div></td>
</tr>

<tr>
<td ali><input type="button" onClick="calcular();" value="Calcular">
</tr>

</table></center>
</form>
</body>
</html>