Created
February 2, 2012 02:27
-
-
Save robtarr/1720993 to your computer and use it in GitHub Desktop.
Number Input Tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Number Test</title> | |
<style> | |
tr { | |
background: #ddd; | |
} | |
tr:nth-child(odd) { | |
background: #ccc; | |
} | |
td { | |
border: 1px solid #bbb; | |
} | |
</style> | |
</head> | |
<body> | |
<table> | |
<thead> | |
<tr> | |
<th>Input</th> | |
<th>Chrome 16 (Mac)</th> | |
<th>Firefox 8 (Mac)</th> | |
<th colspan="2">iOS 5</th> | |
<th colspan="2">Kindle Fire</th> | |
</tr> | |
<tr> | |
<th></th> | |
<th>Comma</th> | |
<th>Comma</th> | |
<th>Comma</th> | |
<th>Keyboard</th> | |
<th>Comma</th> | |
<th>Keyboard</th> | |
</tr> | |
<tbody> | |
<tr> | |
<td> | |
<input type="number" value="45402"> | |
<pre><input type="number" value="45402"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>yes</td><td>number</td> | |
<td>no</td><td>keypad</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="number" value="45402"> | |
<pre><input type="number" value="45402"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>yes</td><td>number</td> | |
<td>no</td><td>keypad</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="number" value="45402" pattern="[0-9]*"> | |
<pre><input type="number" value="45402" pattern="[0-9]*"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>yes</td><td>keypad</td> | |
<td>no</td><td>keypad</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="number" value="45402" pattern="[0-9]{5}"> | |
<pre><input type="number" value="45402" pattern="[0-9]{5}"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>yes</td><td>number</td> | |
<td>no</td><td>keypad</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="number" value="45402" name="zip"> | |
<pre><input type="number" value="45402" name="zip"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>yes</td><td>number</td> | |
<td>no</td><td>keypad</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="text" value="45402" name="zip"> | |
<pre><input type="text" value="45402" name="zip"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>no</td><td>text</td> | |
<td>no</td><td>text</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="number" value="45402" name="phone"> | |
<pre><input type="number" value="45402" name="phone"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>yes</td><td>number</td> | |
<td>no</td><td>keypad</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="text" value="45402" name="phone"> | |
<pre><input type="text" value="45402" name="phone"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>no</td><td>text</td> | |
<td>no</td><td>text</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="tel" value="45402"> | |
<pre><input type="tel" value="45402"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>no</td><td>keypad</td> | |
<td>no</td><td>keypad</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="text" value="45402"> | |
<pre><input type="text" value="45402"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>no</td><td>text</td> | |
<td>no</td><td>text</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="text" value="45402" pattern="[0-9]*"> | |
<pre><input type="text" value="45402" pattern="[0-9]*"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>no</td><td>keypad</td> | |
<td>no</td><td>text</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="text" value="45402" pattern="[0-9]{5}"> | |
<pre><input type="text" value="45402" pattern="[0-9]{5}"></pre> | |
</td> | |
<td>no</td><td>no</td> | |
<td>no</td><td>text</td> | |
<td>no</td><td>text</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="text" value="45402" pattern="[0-9]{5}(-[0-9]{4})*"> | |
<pre><input type="text" value="45402" pattern="[0-9]{5}(-[0-9]{4})*"></pre> | |
</td> | |
<td>no</td><td></td> | |
<td>no</td><td>text</td> | |
<td>no</td><td>text</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="pc" value="45402"> | |
<pre><input type="pc" value="45402"></pre> | |
</td> | |
<td>no</td><td></td> | |
<td>no</td><td>text</td> | |
<td>no</td><td>text</td> | |
</tr> | |
<tr> | |
<td> | |
<input type="date" value="45402"> | |
<pre><input type="date" value="45402"></pre> | |
</td> | |
<td>no</td><td></td> | |
<td>--</td><td>Date dropdown</td> | |
<td>no</td><td>text</td> | |
</tr> | |
</tbody> | |
</table> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/a/25599024/1922144