JSFiddle - React, Tailwind, and code Playground

HTML

<input id="ancho"> <!-- Example value="22" -->
Ancho

<input id="fondo"> <!-- Example value="20" -->
Fondo

<input id="alto"> <!-- Example value="16" -->
Alto

<input id="peso"> <!-- Example value="3" -->
Peso

<p>-----------------</p>

<div id="resultado"></div>
Resultado

<p>-----------------</p>

<div id="hacercalculo" onclick="calcular();comparar()">CALCULAR</div>

<div id="uno">1</div>
<div id="dos">2</div>
<div id="tres">3</div>

CSS

body{text-align:center}

p{margin:15px auto}

#uno,#dos,#tres {display:none;width:50px;margin:0 auto;padding:5px 10px;background:#000;color:#fff;text-align:center}

input{display:block;margin:15px auto 5px;border:1px solid #999;background:#ff0;padding:6px 0;text-align:center}

#peso{background:#e6e6e6}

#resultado{width:130px;height:40px;margin:20px auto 5px;line-height:40px;color:#fff;background:green}

#hacercalculo {width:130px;height:40px;margin:15px auto;line-height:40px;color:#fff;background:red;cursor:pointer}

JavaScript

function calcular(){
  v1 = document.getElementById("ancho").value;
  v2 = document.getElementById("fondo").value;
  v3 = document.getElementById("alto").value;
  
  r = v1*v2*v3/4000;

  document.getElementById("resultado").innerHTML = r;
};

// Now (with the "compare" function), we seek to compare between the result of the operation of the "calculate" function and the numerical value that the user writes in the "peso" input.

// If the "IF" condition is met, display the div #uno

function comparar() {

    //var camp1= document.getElementById("resultado");
    var camp1= document.getElementById("resultado").innerHTML;
    var camp2= document.getElementById("peso").value;

    //if (camp1.value >= 0 && camp2.value <= 5) {
    //if (camp1.innerHTML >= 0 && camp2.innerHTML <= 5) {
    if (camp1.innerHTML >= 0 && camp2.value <= 3) {

        $("#uno").show();
    }
};