l练习题目!!!
<script type="text/javascript">
var myDate=new Date();
var myDdy=myDate.getDay();
var weekDay=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"] ;
document.write("今天是:" + weekDay[myDdy] + "<br/>" );
var scoreStr = "小明:87;小花:81;小红:97;小天:76;小张:74;小小:94;小西:90;小伍:76;小迪:64;小曼:76";
var scorArr = scoreStr.split(";");
var sumscore = 0;
for(var i=0;i<scorArr.length;i++){
sumscore+=(parseInt(scorArr[i].split(":")[1]))
}
document.write(scorArr + "<br/>")
document.write(sumscore + "<br/>")
document.write(myDate.getFullYear() + "年" + myDate.getMonth() + "月" + myDate.getDate() + "日" + weekDay[myDdy] + "班级总分:" + sumscore + "平均分:" + sumscore/scorArr.length)
</script>