No 'Access-Control-Allow-Origin' header ajax call

Nov 22 2017 1:43 AM
I got this error No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:52038' is therefore not allowed access.
  1. <script>  
  2. $(document).ready(function () {  
  3. $.ajax({  
  4. url: 'https://www.bickets.com/cinemas.aspx?type=3',  
  5. headers: {  
  6. 'Content-Type''application/x-www-form-urlencoded'  
  7. },  
  8. type: "GET"/* or type:"GET" or type:"PUT" */  
  9. dataType: "json",  
  10. data: {  
  11. },  
  12. success: function (result) {  
  13. console.log(result);  
  14. },  
  15. error: function () {  
  16. console.log("error");  
  17. }  
  18. });  
  19. });  
  20. </script>

Answers (1)