title: How to change color of a input text field when you click on it using javascript?
body: <p>I am new to JavaScript and I need some help with my project!</p>
  
  <p>I am trying to create a form for a company website that allows visitors to email the company directly. When the user clicks the input type=text field to write in their name, I want the background to change color to indicate that they are in that field. Right now I have something like this:</p>
  
  <p><code>&lt;input class="field" type="text"  id = "input" onclick="changeMe()" name="name" placeholder="Name" required autofocus/&gt;</code></p>
  
  <p><code>&lt;script&gt;</code>
  <code>function changeMe() {
          document.getElementById("input").style.backgroundColor = "blue";
          }</code>
  <code>&lt;/script&gt;</code></p>
  
  <p>I know it is easier to do in jquery but unfortunately my teacher only wants us to use javascript right now and mine doesn't seem to be working. I want the background to change colour as soon as the user clicks the input field even before they start typing. </p>
  
  <p>Does anyone know how to do this? </p>
  
  <p>Thank you!!!!!</p>