The following is my code:
$(document).ready(function(){
$.ajax({
url: 'https://bitconnect.co/api/info/BTC_BCC',
type: 'get',
dataType: 'json',
success: function(data){
alert(data);
},
error: function(error){
alert(error);
}
});
});
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src = "//code.jquery.com/jquery-1.12.4.js"></script>
<script src="try.js"></script>
</head>
<body>
</body>
</html>
I want to get the information from the url mentioned in the url section of ajax. But I'm getting the following error :
Failed to load https://bitconnect.co/api/info/BTC_BCC: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
I'm completely new to this section and have no idea of what the error is. It would be great if I could get any kind of help. Thanks in advance.