title: how to handle single quote in $.ajax POST (JQuery)?
body: <pre><code>.ajax({
  
  type: 'POST',
  
  url: '..serverices/ajaxserver.asmx',
  
  data: 'lname='+ $('#lastname').val()
  
  }); return false;
  </code></pre>
  
  <p>if #lastname has a single quote, it throws an error. How to handle it?</p>