Ver Mensaje Individual
  #6 (permalink)  
Antiguo 28/11/2015, 13:58
fbadiola
 
Fecha de Ingreso: octubre-2015
Ubicación: España
Mensajes: 21
Antigüedad: 8 años, 7 meses
Puntos: 6
Respuesta: calcular notas definitivas provenientes de una consulta en tiempo real

Pues al igual que lo haces en el código php que pasaste:
Código PHP:
 <?php 
             $n
=1
             while(
$fila=mysql_fetch_array($sql)){ 
                 
                 
?> 
                 <td><input type="text" id="n" value="<?php echo $n?>"></td> 
                 <td><?php echo '<strong>'.$fila['apellidos']. '   ' .$fila['nombres'].'</strong>'?></td> 
             
                 <td> <input type="number"  name="inas" size="1" maxlength="2" style="width:50px" value="0" step="1" max="8" min="1" ></td> 
                 <td> <input type="number"  id="A<?php echo $n?>"    style="width:50px" value="0"  max="5" min="1" autofocus></td> 
                 <td> <input type="number"  id="B<?php echo $n?>"   style="width:50px" value="0"   max="5" min="1"></td> 
                 <td> <input type="number"  id="<?php echo $n?>"   style="width:50px" value="0"   max="5" min="1" onChange="calcular(this.id);"></td> 
                 <td> <input type="number"  id="resultado<?php echo $n?>"   style="width:50px" value="0" step="0.1" max="5" min="1"></td> 
                 <td> </td> 
                 <td></td> 
                 <tr></tr> 
               <?php 
                $n
++; 
             }                                         
        
?>