【发布时间】:2009-08-03 19:01:12
【问题描述】:
Is there a way to call a javascript function when the selectedIndex of a select input has been changed?
在c#代码隐藏文件中使用此代码
riskSeverityDropDown.SelectedValue = Convert.ToString(planRisk.Severity);
riskSeverityDropDown.SelectedIndexChanged += new EventHandler(riskSeverityDropDown_SelectedIndexChanged);
riskSeverityDropDown.AutoPostBack = true;
希望在索引更改时使用 javascript 更改页面上的其他内容。
任何帮助将不胜感激。 提前致谢
【问题讨论】:
-
看起来您正在尝试构建动态控件... 您是否考虑过在标记中放置常规控件并根据需要将可见设置为 true 或 false ?
标签: c# .net javascript