JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<body>
<h3>Test</h3>
<input type="text" id="myTextA" value="7">
<input type="text" id="myTextB" value="9">
<button onclick="myFunction()">click</button>
<p id="demo"></p>
</body>
</html>
JavaScript
function myFunction() {
var A = document.getElementById("myTextA")
var B = document.getElementById("myTextB")
document.getElementById("demo").innerHTML = parseFloat(A.value)*parseFloat(B.value);
}