JSFiddle - React, Tailwind, and code Playground

HTML

<select id="num2">
    <option>1</option>
    <option>2</option>
</select>
<input type="text" id="num1"></input>
<input type="text" id="prod"></input>
<input type="submit" onclick="mul()"></input>

JavaScript

//num2 is the id of my select tag
var index = document.getElementById("num2").selectedIndex;

//num1 is the id of my textbox
//prod is the id of product textbox
function mul(){
    var a = parseInt(document.getElementById("num1").value);
    var b = document.getElementById("num2").value;
    var c = document.getElementById("prod");
    c.value=(a*b);
    console.log(a)
    console.log(b)
}

window.mul = mul