weixin_33675507 2017-04-26 15:34 采纳率: 0%
浏览 3

Ajax:如何获得请求?

<p><input type="button" id="ajax" value="click here!"/><br/>
<script type="text/javascript">
  $(function () {
      $('#ajax').click(
          function () {
              $.ajax({
                  type: 'get',
                  url: 'https://example.com',
                  success: function (data) {
                      alert("OKAY");
                  },
                  error: function (data) {
                      alert("NG");
                  }
              });
          });
  });

I want to GET request using Ajax in Rails but sent options request.

This is an error shown console log

OPTIONS https://example.com 405 (Method Not Allowed)

  • 写回答

0条回答 默认 最新

    报告相同问题?