title: How to set previous value when cancelling a drop-down list change event
body: <p>I am designing a html page.
  I want to show a confirmation msg on changing a drop down element using jquery or javascript.
  Please help to do this.</p>
  
  <p>I have code which will ask confirmation. On selecting cancel it will not select previous item of Drop down.</p>
  
  <pre><code>$("#dropdownId").change(function(e) 
  {
          if($(this).val() == "40")
          {
              if(confirm("Are you sure"))
                  return true;
              else
                  return false;
          }
  });
  </code></pre>
  
  <p>Thanks</p>