📜  作业 1 - Html 代码示例

📅  最后修改于: 2022-03-11 14:52:53.332000             🧑  作者: Mango

代码示例3
var counter = 0;

function plus() {
  counter += 1;
  document.getElementById("counter").innerHTML = counter;
}

function minus() {
  if(counter > 0){
    counter -= 1;
  }
  document.getElementById("counter").innerHTML = counter;
}