Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

Assignment 1

var counter = 0;

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

function minus() {
  if(counter > 0){
    counter -= 1;
  }
  document.getElementById("counter").innerHTML = counter;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Assignment
ADD COMMENT
Topic
Name
4+7 =