gpt4 book ai didi

kendo-ui - 在 Web 应用程序中使用 Kendo UI 开关

转载 作者:行者123 更新时间:2023-12-02 19:16:25 25 4
gpt4 key购买 nike

我正在尝试使用 Kendo 移动小部件 - 在我的 Web 应用程序中切换,如下所示:

enter image description here

<input id="btnConvert" type="checkbox" onclick="onChange();" />

$(document).ready()
{
$("#btnConvert").kendoMobileSwitch({
onLabel: "UK",
offLabel: "US"
});
}
function onChange(e) {
alert(e.checked);//true of false
}

但它没有触发点击事件。我尝试了 onchange 事件,但也不起作用。

我也尝试过

    $('input:checkbox').change(function () {
}

但没有成功...

最佳答案

switch 定义中定义 change 处理程序事件。

$("#btnConvert").kendoMobileSwitch({
onLabel: "UK",
offLabel: "US",
change : function (e) {
alert("You changed the value");
}
});

请参阅文档 here .

关于kendo-ui - 在 Web 应用程序中使用 Kendo UI 开关,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24999809/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com