1 reply [Last post]
maxylopes
maxylopes's picture
Offline
newbie
Ltu
Last seen: 11 years 24 weeks ago
Ltu
Timezone: GMT+3
Joined: 2011-02-21
Posts: 3
Points: 5

Hello again!
What type to make so will allow to input only numbers? Smile

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 2 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Hi maxylopes, HTML5 will have

Hi maxylopes,
HTML5 will have an input type for numbers http://dev.w3.org/html5/markup/input.number.html although there will be very little browser support if any currently.
You would be better off validating the input via JavaScript on the client then running it through further validation on the server with form submission and processing.