JSFiddle - React, Tailwind, and code Playground

HTML

<html>

<body>
<input type="text" id="Num1" name="One"> <br>
<input type="text" id="Num2" name="Two"> <br>
<button onclick="calc(document.getElementsByName('One')[0].value, 
                        document.getElementsByName('Two')[0].value);">
my button
    </button>


hahahah

</body>

</html>

JavaScript

function calc(a,  b) {
        c = Number(a) + Number(b);
        document.getElementById("Num1").value = c;
}