<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server" Enabled=false>
<asp:ListItem>请选择</asp:ListItem>
<asp:ListItem>人</asp:ListItem>
<asp:ListItem>鬼</asp:ListItem>
<asp:ListItem>蛇</asp:ListItem>
<asp:ListItem>神</asp:ListItem>
<asp:ListItem>牛</asp:ListItem>
<asp:ListItem>马</asp:ListItem>
</asp:DropDownList>
<input id="Button1" type="button" value="button" onclick="objclick()"/>
</div>
</form>function objclick()
{
document.getElementById("DropDownList1").getAttribute("disable")="enabled";//不知道怎么修改此属性
}我想通过按钮在前台改变DropDownList可不可用的属性,请高手指点一下!
setAttribute("disabled",true);