Questions tagged «http-options-method»

10
为什么我收到OPTIONS请求而不是GET请求?
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script> <script> $.get("http://example.com/", function(data) { alert(data); }); </script> 它对该URL进行OPTIONS请求,然后永远不调用回调函数。 如果它不是跨域的,则可以正常工作。 jQuery是否不应该仅使用<script>节点进行调用,然后在加载时进行回调?我知道我将无法获得结果(因为它是跨域的),但是没关系;我只想打通电话。这是一个错误,还是我做错了什么?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.