title: Submitting form depend of color clicked
body: <p>i have form that's announcing user for error, warning or new content on my site. I have three buttons on class <code>ann-right</code> and each button have its color. When i click the button, the button input on class <code>ann-left</code> changed to color were clicked. What i want to ask is, how do i submit the form depend of color selected. Red is for "Error announcement", Green is for "Warning announcement" and Blue is for "New announcement". <code>Red = #D91E18</code>
  <code>Green = #3FC380</code>
  <code>Blue = #5BBBFF</code></p>
  
  <pre><code>  &lt;div class="ann-left"&gt;
    &lt;form method="post" id="ann"&gt;
       &lt;input id="announce-text" type="text" name="" placeholder="What's new?"&gt;&lt;/input&gt;
       &lt;input id="submit-post" type="button" name="" onsubmit="submitform();" value="Post"&gt;&lt;/input&gt;
    &lt;/form&gt;
    &lt;/div&gt;
    &lt;div class="ann-right"&gt;
     &lt;button id="red" onclick="color1()" class="tooltip color" title="Error!"&gt;&lt;/button&gt;
     &lt;button id="green" onclick="color2()" class="tooltip color"title="Warning!" &gt;&lt;/button&gt;
     &lt;button id="blue" onclick="color3()" class="tooltip color" title="New!"&gt;&lt;/button&gt;
    &lt;/div&gt;
  
  &lt;script&gt;  
  function color1() {
    document.getElementById("submit-post").style.backgroundColor = "#D91E18";
    sessionStorage.setItem('col1', "#D91E18");
  }
  function color2() {
    document.getElementById("submit-post").style.backgroundColor = "#3FC380";
    sessionStorage.setItem('col2', "#3FC380");
  }
  function color3() {
    document.getElementById("submit-post").style.backgroundColor = "#5BBBFF";
    sessionStorage.setItem('col3', "#5BBBFF");
  }
  
  color1(sessionStorage.getItem('col1'));
  color2(sessionStorage.getItem('col2'));
  color3(sessionStorage.getItem('col3'));
  
  function submitform() {
  }
  &lt;/script&gt;
  </code></pre>