【发布时间】:2020-05-20 16:26:47
【问题描述】:
您好,我正在处理我的网站之间的简单 js 调用,但我收到 Cross-Origin Request Blocked: 错误。
这是我的代码:
<script>
$.getScript( "http://myts1.com/rotator.js?1418419096" )
.done(function( script, textStatus ) {
new PFRotator({'width': '300', 'height': '250', 'vertical': '12, '}, 'PF300x250', '395953', '', '', 'Yes');
})
.fail(function( jqxhr, settings, exception ) {
$( "body" ).text( "Triggered ajaxError handler." );
});
</script>
ERROR :
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myts1.com/GETBANNERS.php?width=300&height=250&width=300&height=250&vertical=12%2C%20&mode=banner&mobile=false. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
【问题讨论】:
标签: javascript cross-origin-read-blocking