I can't seem to figure out this problem that I have:
<script>
function getValues(){
var value1 = document.getElementById("value1");
var value2 = document.getElementById("value2");
var value3 = document.getElementById("value3");
alert(value1 +" "+ value2 +" "+ value3);
}
</script>
<p>value1</p>
<input type="text" id='value1' />
<p>value2</p>
<input type="text" id='value2' />
<p>value3</p>
<input type="text" id='value3' />
<input type="button" value="submit" onclick="getValues()" />
I try to get the values the user filled in and then alert them back to them but instead of showing the values they filled in, it says:
[object HTMLInputElement] [object HTMLInputElement] [object HTMLInputElement]
Does anyone have an idea what could be the problem?