title: Getting my javascript output to display in my HTML
body: <p>I am sure this is a simple question.</p>
  
  <p>To begin really playing with javascript and understand it I need to have the environment to see what my output is. I have done lessons in javascript but need to actually get the HTML and javascript talking. </p>
  
  <p>What I am looking to do: </p>
  
  <p>Have a user input information into an text box and have it show the result in the html.</p>
  
  <p>is the sky blue? Yes (makes true be displayed on my HTML) 
  is the sky blue? No (makes false be displayed in my HTML)</p>
  
  <p>currently i have no idea if my javascript is doing anything!</p>
  
  <p>Here is my code: </p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form action="" onsubmit="return checkscript()"&gt;
  &lt;input type="text" name="value"&gt;
  &lt;input type="submit" value="Submit"&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>function checkscript() {
  for (i=0;i&lt;4;i++) {
      box = document.example.elements[i];
      if (!box.value) {
          alert('You haven\'t filled in ' + box.name + '!');
          box.focus()
          return false;
      }
  }
  return true;
  }
  
  document.write(box);
  </code></pre>
  
  <p>I am so confused but need to see the results of what i am doing to see where to fix things, i tried using console in chromes inspect elements function but this has confused me more. </p>
  
  <p>Can someone help and clean the code up to make sense by labelling everything as what they do?</p>
  
  <p>box? check script? </p>
  
  <p>Thanks :)</p>