How do I make an input box accept numbers only?

Can’t users type into the textbox as well?