<!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="">語(yǔ)文</span><input type="text" name="Chinese" id="Chinese" value="" />
<br />
<span id="">數(shù)學(xué)</span><input type="text" name="Math" id="Math" value="" />
<br />
<span id="">英語(yǔ)</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('獎(jiǎng)給一個(gè)小提琴');
}
else{
alert('給你一巴掌');
}
document.result = sum;
}
</script>
</body>
</html>