Make it so that an Input text box will only do integers

Hi, I need help trying to figure out how to code how to let an Input type text box opnly take integers from 0 to 5000. Thanks.