我想将自定义变量发送到 customID:5 之类的 url。如何添加此代码。请帮助
$("#e8").select2({
placeholder: "Search for another Concept",
minimumInputLength: 1,
multiple: true,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "sendchat3.php",
dataType: 'json',
data: function (term, page) {
return {
q: term, // search term
page: page
};
},
results: function (data, page) {
return { results: data};
}
}
});