Beyond not having the basic framework for the HTML, you have one error according to the W3C validator:
<input id="display" value="0" size="15" readonly="true" >
readonly="true"
is not valid, the correct attribute is readonly="readonly"
There is a pretty bad UI problem here. When you click the buttons as follows 9 - 3 = 2
, the calculator reads 62
, whereas it should reset and only read 2
because you clicked the =
button.
Beyond this, your calculator does not follow the order of operations. Probably the simplest way to handle this would be to only update the calculation when the +
, -
, and =
buttons are pressed (like the Windows calculator does), parsing and calculating everything else from the stack.