Ask coding questions

← Back to all posts
Input value not working
MilescOde

I'm making a calculator and for some weird reason when I try to get the inputs and add them when I try it it doesn't have any output. Not even
'[Object InputHTMLElement]'.

Voters
MilescOde
Comments
hotnewtop
SixBeeps

getElementById returns a DOM object. You need to get the value property of the inputs to get the text that it holds.

MilescOde

@SixBeeps Thanks!