怎么用js来控制dropdownlist

来源:百度知道 编辑:UC知道 时间:2024/05/05 02:56:14
比如有个dropdownlist第一项是“请选择,后面是其他内容,我选了其他内容,然后点一个按钮调用js使他变成“请选择”

function onc()
{
form1.DropDownList1.value="请选择";
}
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>请选择</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem Selected="True"></asp:ListItem>
</asp:DropDownList>
<input id="Button1" type="button" value="button" onclick="onc()" /></div>