title: esponse to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin'
body: <p>hi i am using jquery ajax method to get accces to login token but getting this message </p>
  
  <blockquote>
    <p>Failed to load <a href="https://login.salesforce.com/services/Soap/u/42.0?wsdl" rel="nofollow noreferrer">https://login.salesforce.com/services/Soap/u/42.0?wsdl</a>:
    Response to preflight request doesn't pass access control check: No
    'Access-Control-Allow-Origin' header is present on the requested
    resource. Origin '<a href="https://www.example.com" rel="nofollow noreferrer">https://www.example.com</a></p>
  </blockquote>
  
  <pre><code>$(document).ready(function(){
  
                  //alert('blnk');
        $.ajax({
  
           headers: {
  
          "Accept" :'application/json'   //If your header name has spaces or any other char not appropriate
       },
              url: 'https://login.salesforce.com/services/Soap/u/42.0?wsdl',
               contentType: "application/json; charset=utf-8",
      type: 'post',dataType: "post",data:JSON.stringify( {username  :'demo',  password  :'demo'}),
          crossDomain: true, 
  
          success: function(resuklt){
           console.log(resuklt);  
  
          }});
       [enter image description here][1]
      });
  </code></pre>