I'm building a program where you have an input box and an button, when user presses the button, the button value is displayed on the input box. I've tried the following:
[code=JavaScript]
function calculation() {
value1=parseInt (document.getEl ementById("x"). value); //input box
nine=parseInt(d ocument.getElem entById("nine") .value); // button
value1=nine;
}
[/code]
What I'm I doing wrong?
[code=JavaScript]
function calculation() {
value1=parseInt (document.getEl ementById("x"). value); //input box
nine=parseInt(d ocument.getElem entById("nine") .value); // button
value1=nine;
}
[/code]
What I'm I doing wrong?
Comment