how to change jQuery autocomplete plugin default querystring key? (term to that i want)

后端 未结 3 888
攒了一身酷
攒了一身酷 2021-01-01 10:42

jQuery autocomplete plugin sent request like this

mysite.com/suggestion?term=Sadegh

is there any way to change term querystring key to anot

3条回答
  •  执笔经年
    2021-01-01 11:30

    The above is not correct for the current release (1.8.6). Not sure if it ever was...

    $(...).autocomplete({
      source: function(request, response) {
        $.getJSON("url", { foo: request.term }, response);
      }
    });
    

    foo: being the new param key name..

提交回复
热议问题