Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/05/2010, 04:57
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 17 años, 3 meses
Puntos: 126
Respuesta: Multiplicar el total

Hola

No se, este código me suena

Sería algo como esto

Código Javascript:
Ver original
  1. <script>
  2. function calcular(campo) {
  3. total = (parseFloat(campo) + parseFloat(campo * 1.16)).toFixed(2);
  4. document.getElementById("resultado").innerHTML = total;
  5. }
  6.   </script>
  7. <input name="c0" type="radio" onclick="calcular(this.value)" value="1000" />
  8. <input value="1050" type="radio" name="c0" onclick="calcular(this)" />  
  9. <table width="84" border="0">
  10.                   <tr>
  11.                     <td width="52"><table width="54">
  12.                         <tr>
  13.                           <td width="34">Total: </td>
  14.                           <td width="10" id="resultado">0</td>
  15.                         </tr>
  16.                     </table>

Suerte
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />