title: How to use option value in wordpress using ajax and jquery?
body: <p>I am developing on plugin where in one stage i want make use of ajax using jquery for select box, below is my code , i done know how to use ajax in wordpress can anyone please help me</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select id="payment_status"&gt;           
                          &lt;option value="Payment Due"&gt;Payment Due&lt;/option&gt;
                          &lt;option value="Payment Completed"&gt;Payment Completed&lt;/option&gt;
                          &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>     $(document).ready(function() {
                              $("#payment_status").change(function(){
                                  jQuery.ajax({
                                  type:"post",
                                      url:ajaxurl,
                                  data:  {action: 'test.php',keyname:$('#payment_status option:selected').val()}
                                      // alert($('#payment_status option:selected').val());
                              })
                          });</code></pre>
  </div>
  </div>
  </p>