title: Javascript Prompt() Alternative
body: <p>Simple JavaScript.</p>
  
  <pre><code>var userName = prompt ("What's your name?");
  document.write ("Hello " + userName + ".");
  </code></pre>
  
  <p>Is there an alternative way to get the user's input (name) than through a pop up box?
  How would I go about implementing a text box within the site to obtain the user's name?</p>
  
  <p>How is this?</p>
  
  <pre><code>&lt;section class="content"&gt;
  &lt;input id="name" type="text"&gt;
  &lt;button onclick="userName()"&gt;Submit&lt;/button&gt;
  &lt;p id="user"&gt;&lt;/p&gt;
  &lt;script&gt;
  function userName() {
  var name = document.getElementById("name").value;
  user.innerHTML = "Hello" + " " + name}
  &lt;/script&gt;
  &lt;/section&gt;
  </code></pre>