尝试使用功能,在JavaScript中添加三个数字,但它不是增加他们,而不是它只是写他们作为一个数量尝试使用功能,在JavaScript中添加三个数字,但它不是增加他们,而不是它只是写他们作为一个数量
function numinput(a,b,c,res){
a = prompt("Enter first number");
b = prompt("Enter second number");
c = prompt("Enter third number");
res = a + b + c ;
alert (res);
}
numinput();
的可能的复制[使用Javascript级联数字,而不是增加了( HTTP://计算器。com/questions/14656003/javascript-concatenating-numbers-not-add-up) – legoscia