title: Ho to send ajax request for file in same directory
body: <p>I want to create app when I an put url to input field and get some information about request(title of page and response code). I read many topics and understood that I can't send request to another domain like "google.com" and others. Then I created file in directory with my html file named hi.php and send request like this:</p>
  
  <pre><code>&lt;script&gt;
             function getInformation() {
  
                   $.ajax({
                       type:"POST",
                       url:"http://localhost/test/hi.php",
                       success:function(data) {
                          alert(data);
                       }
                   });
               }
      &lt;/script&gt;
  </code></pre>
  
  <p>but still have error </p>
  
  <pre><code>No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
  </code></pre>
  
  <p>how can I fix it? What I did wrong?</p>