0

我使用此代码

   <asp:TextBox ID="txtsearch" runat="server" Style="margin-top:21px; margin-right: 14px; margin-bottom: 0px;
                width: 120px; height: 13px; font-size: 11px" BorderStyle="None"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TBWE2" runat="server"
TargetControlID="TextBox1"
WatermarkText="Type First Name Here"
WatermarkCssClass="watermarked" />

风格是

 .unwatermarked
    {
        height: 18px;
        width: 148px;
    }

    .watermarked
    {
        height: 20px;
        width: 150px;
        padding: 2px 0 0 2px;
        border: 1px solid #BEBEBE;
        background-color: #F0F8FF;
        color: gray;
    }

它是显示水印,但它是闪烁的文字!

4

1 回答 1

0

像下面这样更改你的代码我在 IE、Mozilla、chrome 中有 chk

<asp:TextBox ID="TextBox1" runat="server" Style="margin-top:21px; margin-right: 14px; margin-bottom: 0px;
                    width: 120px; height: 13px; font-size: 11px" ></asp:TextBox>

            <asp:TextBoxWatermarkExtender ID="TextBox1_TextBoxWatermarkExtender" 
                runat="server" Enabled="True" WatermarkText="Type First Name Here"
     WatermarkCssClass="watermarked" TargetControlID="TextBox1">
            </asp:TextBoxWatermarkExtender>
于 2012-06-08T06:38:38.323 回答