Guardar en Mysql la resta generada en Java
Número de Hijos:
<input type="text" id=\'numero_hijos\' size=\'2\'>
Mujeres:
<input type="text" id=\'mujeres\' size=\'2\'>
Hombres:
<input type="text" id=\'hombres\' size=\'2\'>
<script>
function id(x) {
return document.getElementById(x);
}
function toInt(x) {
return parseInt(id(x).value, 10);
}
function calcularNumeroHijos() {
var a = toInt(\'numero_hijos\'),
b = toInt(\'mujeres\'),
c = toInt(\'hombres\');
a = isNaN(a) ? 0 : a;
b = isNaN(b) ? 0 : b;
c = isNaN(c) ? 0 : c;
id(\'hombres\').value = a - b;
}
id(\'numero_hijos\').onkeyup = calcularNumeroHijos;
id(\'mujeres\').onkeyup = calcularNumeroHijos;
id(\'hombres\').onkeyup = calcularNumeroHijos;
</script>
Necesito ayuda porfa, los valores que se generan de la resta no se guardan en los registros correpondientes a la base de datos.
<input type="text" id=\'numero_hijos\' size=\'2\'>
Mujeres:
<input type="text" id=\'mujeres\' size=\'2\'>
Hombres:
<input type="text" id=\'hombres\' size=\'2\'>
<script>
function id(x) {
return document.getElementById(x);
}
function toInt(x) {
return parseInt(id(x).value, 10);
}
function calcularNumeroHijos() {
var a = toInt(\'numero_hijos\'),
b = toInt(\'mujeres\'),
c = toInt(\'hombres\');
a = isNaN(a) ? 0 : a;
b = isNaN(b) ? 0 : b;
c = isNaN(c) ? 0 : c;
id(\'hombres\').value = a - b;
}
id(\'numero_hijos\').onkeyup = calcularNumeroHijos;
id(\'mujeres\').onkeyup = calcularNumeroHijos;
id(\'hombres\').onkeyup = calcularNumeroHijos;
</script>
Necesito ayuda porfa, los valores que se generan de la resta no se guardan en los registros correpondientes a la base de datos.