function calculate()
{
var num1 = document.getElementById("input1").value;
var num2 = document.getElementById("input2").value;
var operator = document.getElementById("operation");
var totalNum = document.getElementById("total");
if (operator == "+")
{
parseDouble(totalNum = num1 + num2);
}
else if(operator == "-")
{
parseDouble(totalNum = num1 - num2);
}
total.value = totalNum;
}
私の出力は [object HTMLInputElement] です。数学演算を区別する方法??