Breadit here and I have a problem. I tried to look everywhere but can't find a single answer that will work. I am trying to make a button which will square the first tag and will print the output on the second tag.
JavaScript:
function square() {
var a=document.getElementById("inputSquare");
var b=a*a;
document.getElementById("outputSquare").value=b;
}
HTML:
<input type="number" id="inputSquare">
<button onclick="square()">=</button>
<input type="number" id="outputSquare" readonly>
That is my problem.