无法理解为什么我的 key=value 对转换为符号,并且在我的 ajax GET 调用中我有:
GET /admin_schedule/get_schedule_db/?0=%5B&1=o&2=b&3=j&4=e&5=c&6=t&7=+&8=O&9=b&10=j&11=e&12=c&13=t&14=%5D&15=%22&16=%26&17=t&18=e&19=a&20=c
代替:
GET /admin_schedule/get_schedule_db/?teacherArray[]=128&teacherArray[]=134...
我的代码:
var eventss = '';
$("input[type='checkbox'][name='teacher']").each( function() {
if(this.checked) {
eventss += "&teacherArray[]=" + $(this).attr("value");
}
});
events1.data += eventss;
全日历事件源的 ajax:
var events1 = {
url: '/admin_schedule/get_schedule_db/',
type: 'GET',
data: {sch_teacher_id: (sch_teacher_id) ? sch_teacher_id : $('.teacher').val() },
success: function (response) {
return response;
}
};
然后获取带有事件的完整日历
eventSources: [
events1,
events2,
events3
],