weixin_33681778 2015-12-06 19:29 采纳率: 0%
浏览 41

ruby ajax请求与参数

Is this proper when making an ajax request via ruby to use two params?

function drawIt(one_id, quest_id){
  var request = $.ajax({
    url: "/reer/porip?rn_id=" + one_id + "?two_id=" + quest_id,
    type: "GET",
    dataType: "json"
  });
  • 写回答

1条回答 默认 最新

  • 胖鸭 2015-12-06 19:31
    关注

    it's ok, however you have double ? char in url. It should be:

    url: "/reer/porip?rn_id=" + one_id + "&two_id=" + quest_id,

    parameters in url are separated by &

    评论

报告相同问题?