title: onclick jquery to submit form without reloading the page
body: <p>hey guys so this page im trying to create has tabs with the names of months for each tab and the content of the tabs is a form and a submit button. The problem im facing is, for example, if im on the February tab and i have filled in the form and when i click submit the page reloads(the data inserted into database) and goes back to the first tab which is January. how do i stop that from happening? meaning after clicking on submit and data is inserted successfully it still stays on the February tab. i read that i have to use  tag with onClick attribute but thats it. my knowledge of javascript is minimal. </p>
  
  <p>part of the tab with content:</p>
  
  <pre><code>             &lt;div class="tabContent" id="feb"&gt;
           &lt;form method="post" action="income.php"&gt;
      &lt;input type="hidden" name="feb" value="February"&gt;
              &lt;center&gt;&lt;h2&gt;February &lt;/h2&gt;&lt;/center&gt;
              &lt;div&gt;
      &lt;div style="height:0px;"&gt;
      &lt;div class="rmtotal"&gt;
           &lt;h3&gt;Your Total Income :&lt;/br&gt; RM   &lt;input type="text" id="febtotal"         
                     name="febtotal" size="11" readonly value="&lt;?php if(@$fsql) {echo   
                         htmlentities(@$fprev['total']);} if(isset($_POST['febtotal']))
                           {echo htmlentities($_POST['febtotal']);}?&gt;" &gt;&lt;/h3&gt;
      &lt;/div&gt;
      &lt;input type="submit" value="Save" class="save" name="febsave"&gt;
      &lt;button type="submit" class="prev" name="febprev" id="button" 
               onClick=""&gt;Select from previous Month&lt;/button&gt;
      &lt;/div&gt;
      &lt;table border="1" rules="groups" cellpadding="10px;" class="tableincome"&gt;
      &lt;thead&gt;
          &lt;th&gt;Monthly Salary&lt;/th&gt;
          &lt;th&gt;&lt;/th&gt;
          &lt;th&gt;RM&lt;/th&gt;
      &lt;/thead&gt;
      &lt;tr&gt;
          &lt;td&gt;Basic Salary&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;center&gt;&lt;input type="text" class="feb" placeholder="0" 
                  name="febbasic" size="11" value="&lt;?php if(@$fsql) {echo 
            htmlentities(@$fprev['basic']);} if(isset($_POST['febbasic'])){echo 
               htmlentities($_POST['febbasic']);}?&gt;"&gt;&lt;/center&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/table&gt;
      &lt;/form&gt;
        &lt;/div&gt;
        &lt;/div&gt;  
  </code></pre>