Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道 asp:DropDownList 的客户端事件(如 onChange)。
你说的是 ASP 应用程序吗?此应用程序生成 HTML 代码,因此您可以使用所有 HTML 事件,select标记(select是下拉列表的 HTML 标记)如下:
select
onchange
onclick
ondblclick
onmousedown
onmouseup
onmouseover
onmousemove
onmouseout
onkeypress
onkeydown
onkeyup
onfocus
onblur
您可以通过编程将onchange客户端事件分配给 DropDownList 控件:
DropDownListID.Attributes["onchange"] = "javaScriptFunction();";
看看这篇文章: