Access to XMLHttpRequest at 'http://xxx.com/api/xxx' fromorigin 'null' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
错误描述:在使用ajax调用api接口的时候,报错如下:Access to XMLHttpRequest at 'http://xxx.com/api/xxx' fromorigin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.错误代码如下:$(function() { $.post('http://xxx