Hide HTML5 number input’s spin box but accepts alphanumeric characters <p>i have hidden the spinbox arrows from an input type="number" but the number restrictions doesn't work already. Hence, the numberbox now accepts alphanumeric characters.</p> <p>I used this code when i was able to hide the spinner arrows:</p> <pre><code>input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { /* display: none; &lt;- Crashes Chrome on hover */ -webkit-appearance: none; margin: 0; /* &lt;-- Apparently some margin are still there even though it's hidden */ } </code></pre> <p>hi @BenM! thanks for editing my question. Now, thanks for the idea of using <em>javascript</em> @FakeRainBrigand but it didn't work for me. </p> <p>This worked for me though. I'm using <strong>MVC</strong> and <strong>Razor</strong></p> <p>` function keeypress(e) { var unicode = e.keyCode ? e.keyCode : e.charCode</p> <pre><code> if (unicode == 8) { return; }; if (unicode == 37 || unicode == 39 || unicode == 38 || unicode == 40 || unicode == 27) { return; } else { }; if (unicode == 13) { e.preventDefault(); }; if ($.isNumeric(String.fromCharCode(unicode)) == false) { e.preventDefault(); }; } </code></pre> <p>`</p>