Well the problem I have is that I want to do something very simple and I want to perform a mathematical operation depending on the type of operation that is selected (this is done by the type) but I do not know how to access through the DOM so that to be able to do this operation this is the code that I have for now
<!DOCTYPE html>
<html>
<head>
<title>
</title>
</head>
<body>
<form>
<input id="numero1" type="text" name="">
<input id="numero2" type="text" name="">
<select id="operaciones">
<option id="suma" value="sumaa">Suma</option>
<option id="multiplicacion" value="multiplicaionn">multiplicacion</option>
<option id="divicion" value="divicionn">Divicion</option>
</select>
<input type="button" name="" value="calcular" onclick="operacion()">
</form>
<script type="text/javascript" >
function operacion(){
var numero1=document.getElementById("numero1");
var numero1=parseFloat("numero1");
var numero2=document.getElementById("numero2");
var numero1=parseFloat("numero1");
var operation = document.getElementById("operaciones").value;
if (operation=="suma" ){
/*Codigo de la operacion de la suma aqui*/
}
}
</script>
</body>
</html>
If you need more information, let me know. Thank you very much