详细说明:
首先先来看一下效果图
如果感兴趣的就来看一下Js源码吧
//计分板
var board = {
dom: document.getElementById("score"),
maxLost: 3, //最大丢失量
lost: 0, //当前丢失了多少个
score: 0, //当前分数
render: function() {
//显示
this.dom[removed] =
"得分:" +
this.score +
"
丢失:" +
this.lost +
" / " +
this.maxLost +
"
";
},