在kendo下拉列表中,选择一个下拉值时,它应重定向到另一页并获取这些值
我有一个这样的剑道下拉菜单
$("#txt-ddl").kendoDropDownList({
dataTextField: "name",
dataValueField: "id",
dataSource: {
transport: {
read: {
url: "/XXXX/XXXX",
dataType: "json"
}
}
}
})
我有一个这样的剑道下拉菜单。
目前尚不清楚您要实现的目标,但是如果要在选择项目时进行重定向,则取决于可以使用的特定项目change
或select
kendo DropDownList事件。
$("#txt-ddl").kendoDropDownList({
dataTextField: "name",
dataValueField: "id",
dataSource: {
transport: {
read: {
url: "/XXXX/XXXX",
dataType: "json"
}
}
},
change: function(){
var item = this.dataItem();
// Make the necessary redirection
// For example:
window.location.href = "example.com/" + item.id;
}
});
注意:来自kendo docs-以编程方式更改小部件的值时不会触发该事件。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句