开发者

Chrome - how to disable auto Increment field on input text box

I have a simple input box :

 <input type="number" class="reference_input" value="1234567" pattern="\d*" 
       onkeypress="unicode = event.charCode ? event.charCode : event.keyCode;           
       if(unicode < 48 || unicode > 57){return false;}" />

I need to have type="number" for android phones to open numeric keyboard by default.

The strange thing is that w开发者_C百科hen I open this page in Chrome I see an auto incrementer field with top and bottom arrow.

Is there a way to remove this field (auto incrementer)?

EDIT :

I just found a similar question : Chrome auto formats input=number


use this css:

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜