我使用以下代码尝试获取Telerik RadComboBox的当前选定值:
var combobox = $find("<%= cboBoxA.ClientID %>");
var txt = combobox.get_selectedItem().get_value();
但是我收到以下JavaScript错误:
错误:对象不支持属性或方法“ get_value”
出什么问题了?谢谢。
答案 0 :(得分:0)
以下代码对我有用:
var combobox = $find("<%= cboBoxA.ClientID %>");
var txt = combobox.get_text();
答案 1 :(得分:0)
var combo = $find('<%=cboBoxA.ClientID %>');
alert(combo.get_selectedItem().get_value());
请参阅这些链接 https://docs.telerik.com/devtools/aspnet-ajax/controls/combobox/client-side-programming/overview https://docs.telerik.com/devtools/aspnet-ajax/controls/combobox/client-side-programming/objects/radcombobox-object https://docs.telerik.com/devtools/aspnet-ajax/controls/combobox/client-side-programming/objects/radcomboboxitemcollection-object