HTML Input field force numbers

To make inputing numbers easier, use <input type="number">. To make entering phone numbers easier, use <input type="tel">. Not all phone will support them, but the iPhone at least will give you a numeric keypad by default instead of the normal keyboard. See the spec and Dive Into HTML5 for more information.


You can use <input type='tel'>. This is a new HTML5 feature. Older browsers will simply default to a text input field.


It is possible to limit entry on a "mobile phone" The mobile phone form entry uses

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

input here can be limited using format="*N"