I want to take the value of a text box and put it with a variable, then print the value of the variable as text on the page when a button is pressed. I'm using JavaScript and not using the form tag. So, how do I do this with what I have?
my code:
var x = document.getElementById("I1");
var y = document.getElementById("I2");
var z = x+y;
document.getElementById("B2").onclick = function myFunction2(){
documen.getElementById("H2").innerHTML = x;
}