<form action="/contact" method="POST">
  <input type="text">
  <input type="submit">
</form> 
body {
  background-color: #F1C40F;
  text-align: center;
}

form {
  border: 20px solid white;
  margin: 30px;
  padding: 30px;
  color: white;
  font-size: 2rem;
  outline: none;
  cursor: pointer;
  background-color: #2274A5;
}

input[type="submit"] {
  border: 20px solid white;
  margin: 30px;
  padding: 30px;
  color: white;
  font-size: 2rem;
  outline: none;
  cursor: pointer;
  background-color: #cb1b59;
}

input[type="text"] {
  border: 20px solid white;
  margin: 30px;
  padding: 30px;
  color: white;
  font-size: 2rem;
  outline: none;
  cursor: pointer;
  background-color: #cb1b59;
}
document.addEventListener('DOMContentLoaded', () => {

  document.querySelector('form').addEventListener('submit', event => {
    event.preventDefault()
    console.log('submit')
  })
  
  const inputField = document.querySelector('input[type="text"]')
  
  inputField.addEventListener('input', event => {
    console.log(`The value entered is ${inputField.value}`)
  })
  
  inputField.addEventListener('cut', event => {
    console.log('cut')
  })
  
  inputField.addEventListener('copy', event => {
    console.log('copy')
  })
  
  inputField.addEventListener('paste', event => {
    console.log('paste')
  })
})

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.