1 reply [Last post]
maxylopes
maxylopes's picture
Offline
newbie
Ltu
Last seen: 10 years 29 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: 4 days 1 hour ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

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.