代码之家  ›  专栏  ›  技术社区  ›  Dov Miller

数字上下文本框不在IE中显示按钮[重复]

  •  0
  • Dov Miller  · 技术社区  · 6 年前

    我有一个HTML input

    <input id="textBox1" class="form-control" runat="server"/>
    

    我添加了以下C#代码以使其成为数字上下控件:

    textBox1.Attributes["type"] = "number";
    textBox1.Attributes["min"] = "0";
    textBox1.Attributes["max"] = "50";
    textBox1.Attributes["step"] = "1";
    

    这在Chrome中运行良好,但在Internet Explorer中,上下按钮不显示。

    我知道有人问过类似的问题 here 但我认为在代码隐藏中添加属性可以克服这一点 here

    1 回复  |  直到 6 年前
        1
  •  1
  •   labilbe    6 年前

    https://caniuse.com/#feat=input-number 附加到IE版本的注释是: