<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<span id="">均值</span><input type="text" name="pingjunzhi" id="pingjunzhi" value="result" />
<br />
<span id="">语文</span><input type="text" name="Chinese" id="Chinese" value="" />
<br />
<span id="">数学</span><input type="text" name="Math" id="Math" value="" />
<br />
<span id="">英语</span><input type="text" name="English" id="English" value="" />
<br />
<input type="button" name="btn" id="btn" value="提交" />
<script type="text/javascript">
var pingjunzhi = document.getElementById('pingjunzhi');
var Chinese = document.getElementById('Chinese');
var Math = document.getElementById('Math');
var English = document.getElementById('English');
document.getElementById('btn').onclick=function(){
var a = parseInt(Chinese.value);
var b = parseInt(Match.value);
var c = parseInt(English.value);
var sum = a + b + c;
if(sum/3 >= 90){
alert('奖给一个小提琴');
}
else{
alert('给你一巴掌');
}
document.result = sum;
}
</script>
</body>
</html>