title: how to check image exist or not in my local system using ajax
body: <p>We have image in D:\img\need.png. We need to know image exist or not.We tried like this:-- It's call error method always </p>
  
  <pre><code>$.ajax({
          url:'http://www.himansuit.com//modiyojana.jpg',
          type:'HEAD',
          error: function(jqXHR, textStatus, errorThrown)
          {
              alert("file does not exist");
              console.log(textStatus); 
               console.log(jqXHR); 
               console.log(errorThrown); 
          },
          success: function()
          {
              alert("file exists do something here");//file exists do something here
          }
      }); 
  </code></pre>
  
  <p>Please guide me .What wrong in my code .How check file exist or not in my system using ajax call </p>
  
  <p>We got Error this<img src="https://i.stack.imgur.com/6vo7a.png" alt="enter image description here"></p>