简体   繁体   English

如何避免占位符在Internet Explorer 9中变为大写

[英]how do I avoid my placeholder to be in uppercase in Internet Explorer 9

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. 但是我的问题是使用Internet Explorer时,它还会自动将输入框中的占位符转换为大写。 I do not experience this in google chrome,firefox or safari. 我没有在谷歌浏览器,firefox或safari中遇到这种情况。 How can I avoid it not too automatically convert in IE9? 如何避免在IE9中不太自动转换?

try: 尝试:

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

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();
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM