I would say use type="number"
and then remove spinner with
-webkit-appearance: none;
-moz-appearance:textfield;
References:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number
https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance
This is because on mobile devices you would use in the built-in "numpad".
--
EDIT
I don't agree with Kevin Reid's answer; and I'll tell you why:
If you need a long number for let's say a credit card; you would most likely want to format it with spaces and stuff for readability reasons anyway. Same with phone numbers. A lot of people write their number as they speak with "pauses" in between numbers. Then when you save it; you could save both how the number is formatted and also the number without any spaces, hashtags, dashes or anything like that.
Then ofc. you would want to input text.
In this question OP asked were talking about an ID
Then without a doubt there would be a type="number". He only wanted to get rid of the spinners in this case.
Getting a credit card number wrong by 1 in the last digit isn't a minor mistake, it's as wrong as getting every digit incorrect. So it would not make sense for the user to select a credit card number using "up" and "down" buttons.
This would make sense since a credit card number shall remain private at pretty much all cost. But I don't think it shall apply on a member id.
pattern=“[0-9]+”
orpattern=“\d+”