Question: Although I'm pretty sure this was working yesterday or the day before, `<input type="number" min="0" max="50" step="10" value="0" />`, for example, no longer works in IE10. I've tested my browser with <http://ie.microsoft.com/testdrive/HTML5/Forms/Default.html> and it's just not working anymore. Anyone else having this issue? Or, did it never work?

Answer: 
**Please prefer [the answer](https://stackoverflow.com/a/16092812/1410020) below from `Sampson` as it's more appropriate**

---

IE doesn't have support for input type="number" but you can use a polyfill to make it work.

Here is the solution : <http://html5please.com/#number>
Here's the solution I developed, it works pretty well I think, hope it helps someone 

```js
function handleKeyPress(e) {
    let newValue = e.target.value + e.key;
    if (
    // It is not a number nor a control key?
    isNaN(newValue) && 
    e.which != 8 && // backspace
    e.which != 17 && // ctrl
    newValue[0] != '-' || // minus
    // It is not a negative value?
    newValue[0] == '-' &&
    isNaN(newValue.slice(1)))
        e.preventDefault(); // Then don't write it!
}
```

```html
Insert a number:
<input onKeyPress="handleKeyPress(event)"/>
```