JSFiddle - React, Tailwind, and code Playground
by Tushar Gupta
HTML
<input type="text" name="input1" id="input1" onkeyup="calc()" value="5">
<input type="text" name="input2" id="input2" onkeyup="calc()" value=""> <a href="javascript: void(0)" onClick="calc()">Calculate</a>
<input type="text" name="output" id="output" value="">
JavaScript
function calc() {
var textValue1 = document.getElementById('input1').value;
var textValue2 = document.getElementById('input2').value;
document.getElementById('output').value = textValue1 * textValue2;
}