document.getElementById
returns the HTML element (an input, in your case), not its value. Try this instead:
x = document.getElementById("a").value;
1
solved javascript: Could not add two text inputs
document.getElementById
returns the HTML element (an input, in your case), not its value. Try this instead:
x = document.getElementById("a").value;
1
solved javascript: Could not add two text inputs