LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

  
  Form onSubmit
  
  
  
  
  

Enter dog or cat:


CSS
body {
  margin: 0 auto;background: rgb(244,226,156);
background: -moz-linear-gradient(-45deg, rgba(244,226,156,0) 0%, rgba(59,41,58,1) 100%), -moz-linear-gradient(left, rgba(244,226,156,1) 0%, rgba(130,96,87,1) 100%);
background: -webkit-linear-gradient(-45deg, rgba(244,226,156,0) 0%,rgba(59,41,58,1) 100%), -webkit-linear-gradient(left, rgba(244,226,156,1) 0%,rgba(130,96,87,1) 100%);
background: -o-linear-gradient(-45deg, rgba(244,226,156,0) 0%,rgba(59,41,58,1) 100%), -o-linear-gradient(left, rgba(244,226,156,1) 0%,rgba(130,96,87,1) 100%);
background: -ms-linear-gradient(-45deg, rgba(244,226,156,0) 0%,rgba(59,41,58,1) 100%), -ms-linear-gradient(left, rgba(244,226,156,1) 0%,rgba(130,96,87,1) 100%);
background: linear-gradient(135deg, rgba(244,226,156,0) 0%,rgba(59,41,58,1) 100%), linear-gradient(to right, rgba(244,226,156,1) 0%,rgba(130,96,87,1) 100%);
  
}

h1, h3 {
  margin-top: 20px;
  text-align: center;
}
h1 {
  color: yellow;
}

h3 {
  color: black;
}
JS
function checkPet() {
  if (document.getElementById("whichPet").value === "dog") {
    alert("Bow-wow!"); 
  }  
  else {
    alert("Meow!");
  }
  window.close("mywindow");}

Description

A Smarter Way to Learn JavaScript more onSubmit
Term
Fri, 01/12/2018 - 16:44

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv