如何避免我的占位符在Internet Explorer 9中以大写字母显示

时间:2023-01-27 11:35:37

So I added this css to my input box

所以我把这个css添加到我的输入框中

text-transform: uppercase

So that it would automatically uppercase all my inputs. But my problem is when using Internet Explorer, it also automatically converts the placeholder in my input box as uppercase. I do not experience this in google chrome,firefox or safari. How can I avoid it not too automatically convert in IE9?

这样它会自动大写我的所有输入。但我的问题是在使用Internet Explorer时,它还会自动将输入框中的占位符转换为大写。我没有在谷歌浏览器,Firefox或Safari中体验这一点。我怎样才能避免它在IE9中不能自动转换?

2 个解决方案

#1


1  

try:

/* Internet Explorer 10+ */
.form-control:-ms-input-placeholder {
  text-transform:none;
}

#2


0  

try Like this

尝试像这样

<asp:TextBox ID="TextBox1" AutoPostBack="true" runat="server" 
    ontextchanged="TextBox1_TextChanged"></asp:TextBox>

protected void TextBox1_TextChanged(object sender, EventArgs e)
{
    TextBox1.Text = TextBox1.Text.ToUpper();
}

#1


1  

try:

/* Internet Explorer 10+ */
.form-control:-ms-input-placeholder {
  text-transform:none;
}

#2


0  

try Like this

尝试像这样

<asp:TextBox ID="TextBox1" AutoPostBack="true" runat="server" 
    ontextchanged="TextBox1_TextChanged"></asp:TextBox>

protected void TextBox1_TextChanged(object sender, EventArgs e)
{
    TextBox1.Text = TextBox1.Text.ToUpper();
}