Created
December 10, 2022 14:58
-
-
Save SomtoUgeh/3fff45a77abefbeed3c22e253bd37c45 to your computer and use it in GitHub Desktop.
good numeric input - accessible and clean
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Numeric input</title> | |
</head> | |
<body> | |
<main> | |
<form> | |
<input type="text" inputmode="numeric" pattern="[0-9]*"> | |
<button type="submit">Submit</button> | |
</form> | |
</main> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment