diff --git a/app.js b/app.js index 22c75c3e..fe350438 100644 --- a/app.js +++ b/app.js @@ -4906,36 +4906,40 @@ $( document ).ready(function() { $(document).ready(function(){ $("#uteroDim1").on("change", function(){ + let uteroDim1 = Number.isNaN(the("uteroDim1").value) ? 0 : Number(the("uteroDim1").value) let uteroDim2 = Number.isNaN(the("uteroDim2").value) ? 0 : Number(the("uteroDim2").value) let uteroDim3 = Number.isNaN(the("uteroDim3").value) ? 0 : Number(the("uteroDim3").value) - let uternoVolumen = ((uteroDim1 * uteroDim2 * uteroDim3 * 0.525) / 1000).toFixed(2) + " Cm3" + let uternoVolumen = ((uteroDim1 * uteroDim2 * uteroDim3 * 0.525) / 1000).toFixed(0) + " Cm3" the("uternoVolumen").value = uternoVolumen }) $("#uteroDim2").on("change", function(){ + let uteroDim1 = Number.isNaN(the("uteroDim1").value) ? 0 : Number(the("uteroDim1").value) let uteroDim2 = Number.isNaN(the("uteroDim2").value) ? 0 : Number(the("uteroDim2").value) let uteroDim3 = Number.isNaN(the("uteroDim3").value) ? 0 : Number(the("uteroDim3").value) - let uternoVolumen = ((uteroDim1 * uteroDim2 * uteroDim3 * 0.525) / 1000).toFixed(2) + " Cm3" + let uternoVolumen = ((uteroDim1 * uteroDim2 * uteroDim3 * 0.525) / 1000).toFixed(0) + " Cm3" the("uternoVolumen").value = uternoVolumen }) $("#uteroDim3").on("change", function(){ + let uteroDim1 = Number.isNaN(the("uteroDim1").value) ? 0 : Number(the("uteroDim1").value) let uteroDim2 = Number.isNaN(the("uteroDim2").value) ? 0 : Number(the("uteroDim2").value) let uteroDim3 = Number.isNaN(the("uteroDim3").value) ? 0 : Number(the("uteroDim3").value) - let uternoVolumen = ((uteroDim1 * uteroDim2 * uteroDim3 * 0.525) / 1000).toFixed(2) + " Cm3" + let uternoVolumen = ((uteroDim1 * uteroDim2 * uteroDim3 * 0.525) / 1000).toFixed(0) + " Cm3" the("uternoVolumen").value = uternoVolumen }) $("input").on("keypress",function( e ) { + var key_enter = ["uteroDim1", "uteroDim2", "uteroDim3", "ovarDereMed1", "ovarDereMed2", "ovarDereMed3", "ovarIzquier1", "ovarIzquier2", "ovarIzquier3"]; if (key_enter.includes(this.id)== true){ @@ -4945,6 +4949,7 @@ $(document).ready(function(){ this.value = contenido.substr(0, 3) } } + }); })