【发布时间】:2014-12-22 15:32:33
【问题描述】:
点击事件时是否可以打开网址?我想将我的用户路由到包含与事件相关的详细信息的 url。
【问题讨论】:
点击事件时是否可以打开网址?我想将我的用户路由到包含与事件相关的详细信息的 url。
【问题讨论】:
是的,你可以。只需像这样处理调度程序的change 事件:
$("#scheduler").kendoScheduler({
change: function (e) {
e.preventDefault(); // prevent the default action
if (e.events.length > 0) { // if true then user clicked an event, not an empty slot
window.location.href = 'stackoverflow.com'; // replace with the desired url
}
},
// ... set other properties ...
});
e.events 是一个包含点击事件列表的数组。
【讨论】: