只写了个加法;var first=prompt("请输入第一个加数","");var second=prompt("请输入第二个加数","");var result=parseInt(first)+parseInt(second);confirm("运算结果为"+result);