【问题标题】:Dropdown list highlighting下拉列表突出显示
【发布时间】:2014-10-13 14:36:48
【问题描述】:

我有一个下拉列表,其中包含以下列表项,

<asp:DropDownList ID="ddlsendmail" runat="server" Width="250px" AutoPostBack="true"
    OnSelectedIndexChanged="ddlsendmail_SelectedIndexChanged" onchange="test();">
    <asp:ListItem>--select--</asp:ListItem>
    <asp:ListItem Value="Members">Members</asp:ListItem>
    <asp:ListItem Value="NonMembers">Non-Members</asp:ListItem>
    <asp:ListItem Value="Location">Location</asp:ListItem>
</asp:DropDownList>

当我选择位置时,另一个下拉列表与金奈 (100)、孟买 (156)、班格洛尔 (132) 等值绑定,

<tr id="tdsendmaillocation" runat="server" visible="false">
    <td>
        Location:
    </td>
    <td>
        <asp:DropDownList ID="ddlsendmaillocatiom" runat="server" Width="250px">
        </asp:DropDownList>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" SetFocusOnError="true" ValidationGroup="group"
            ControlToValidate="ddlsendmaillocatiom" InitialValue="0" runat="server" Display="Dynamic"><img src="images/error.png" title="Required Field" border="0" /></asp:RequiredFieldValidator>
    </td>
</tr>

现在我只想从上面的列表项中突出显示 (100),(156),(132).. 红色......

【问题讨论】:

标签: javascript c# jquery


【解决方案1】:

一般来说,你不能这样做。您不能像往常一样在选择框中设置样式选项。有一些替代插件看起来像 SELECT,但实际上是由标准 HTML 元素组成的,这些元素的样式可以像 div 元素一样。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-11
    • 1970-01-01
    • 2014-06-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多