title: How to use the if statement (JavaScript) with the select tag in HTML?
body: <p>I've tried many ways to do this but this isn't right:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Select&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;select name="test"&gt;
              &lt;option value="one"&gt;1&lt;/option&gt;
              &lt;option value="two"&gt;2&lt;/option&gt;
              &lt;option value="three"&gt;3&lt;/option&gt;
          &lt;/select&gt;
          &lt;script&gt;
          if (test=="two") {
              document.write("two!");
          }
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to let something appear on the screen if the user chooses "two" but this doesn't work.</p>