I have a problem, I am receiving a value of an input and I am showing it, the problem is that every time I make the query the page is updated and I do not want the page to be updated every time I make this query, which could do?
<form action="" class="d-flex justify-content-center flex-column">
<label for="">Monto a tomar</label>
<input id="inputFuerte" type="number">
<br>
<button id="boton">Convertir</button>
<br>
<label for="">Monto a mostrar</label>
<div id="txt"></div>
</form>
Javascript
//BsF
var montoRecibido = document.getElementById("inputFuerte").value;
//Bs.S
var montoMostrar = document.getElementById("inputSoberano");
//boton
var boton = document.getElementById("boton");
//funcion
function recibir(){
bsF = document.getElementById("inputFuerte").value;
document.getElementById("txt").innerHTML=bsF;
}
boton.addEventListener("click", recibir);