如何在 Kendo UI 中获取下拉菜单中所选项目的文本? [英] How to Get Dropdown's Selected Item's text in Kendo UI?

查看:12
本文介绍了如何在 Kendo UI 中获取下拉菜单中所选项目的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Kendo UI 控件.我想在 jquery 中获取下拉列表的选定文本.我使用过这种语法:

I am using Kendo UI Controls. I want to get the selected text of the dropdown list in jquery. I have used this syntax :

 $("#ddl").data("kendoDropDownList").text();

我能够在除 IE 之外的所有浏览器中获取文本.我不知道为什么这在 IE 中不起作用,请帮助我.有没有其他方法可以获得选定的文本?

I am able to get the text in all browsers except IE. I don't know why this is not working in IE, please help me. Is there any other way to get selected Text ?

推荐答案

为了获得 DropDownList 的文本值,使用如下命令:

In order to get text value of a DropDownList use command as below :

$("#ddl").data("kendoDropDownList").text();

这篇关于如何在 Kendo UI 中获取下拉菜单中所选项目的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆