私はポストをしようとすると、このエラーが発生しています。 Iveは答えを探しましたが、すべてが私のコードで変更する必要があることを理解するには複雑すぎます。
var url = 'http://unturnedbox.clanservers.com/serverquery/serverQuery.php';
$(document).on('click','.test', function(getServerInfo)
{
var getServerInfo =
{
"ip": "23.229.5.250",
"port": "27021"
}
$.post(url, JSON.stringify(getServerInfo), function(response)
{
response.addHeader("Access-Control-Allow-Origin", "http://unturnedbox.clanservers.com");
if (response.error)
{
}
else
{
$('.test').html('<div>'+ response.result.length +'</div>');
}
});
});
誰かが間違って何イム私に説明してもらえます。ありがとうございました。
http://stackoverflow.com/questions/6114436/access-control-allow-origin-error-sending-a-jquery-post-to-google-apis – abigperson