我有来自 DayPilot 的 ajax 问题。我需要来自 DayPilot 的简单周调度程序,这是我在尝试发送 ajax 时遇到的问题:
Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at XMLHttpRequest.t.onreadystatechange (daypilot-all.min.js:9)
js:
params = {
"start": args.start,
"end": args.end,
"id": DayPilot.guid(),
"text": modal.result
}
// dp.events.add(params)
DayPilot.Http.ajax({
url: "/test",
data: params,
type: 'POST',
success: function(ajax) {
// params.id = ajax.data.id;
dp.events.add(params);
// var response = ajax.data;
// dp.message("Created: " + response.message);
}
});