console
function submit
(){
var p=document.getElementById("one").value
var c=document.getElementById("two").value
var pop=document.getElementById("three").value
var all=Math.round(p*12+c*7+pop*3)
document.getElementById("four").value=all
}
<html>
<head>
<title>点餐系统</title>
</head>
<body>
<span>汉堡包:¥12</span>
<input type="text" id="one"/>
<br/>
<span>薯条:¥7</span>
<input type="text" id="two"/>
<br/>
<span>可口可乐:¥3</span>
<input type="text" id="three"/>
<button onclick="submit()">
提交</button>
<button onclick="clear_value()">
删除</button>
<br/>
<span>总计:</span>
<input type="text" id="four"/>
</body>
</html>