在我看来,我有一个 devexpress combobx:
Html.DevExpress().ComboBox(s =>
{
s.Name = idPola;
s.Style.Add("float", "left");
foreach (SelectListItem item in list)
{
s.Properties.Items.Add(new ListEditItem()
{
Text = item.Text,
Value = item.Value,
Selected = item.Value == selectedValue
});
}
s.SelectedIndex = selectedIndex;
s.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
s.ClientVisible = ControlVisible;
if (Model.Alternative)
{
s.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e){ffff(s)}";
}
else
{
s.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e){HideTextBox(s,e)}";
}
s.Properties.EnableClientSideAPI = true;
}).Render();
如何在 HideTextBox 函数中使用 javascript 获取所选项目的 id?