javascript how to get rid of e with number input
document.querySelector(".your_class").addEventListener("keypress", function (evt) {
if (evt.which != 8 && evt.which != 0 && evt.which < 48 || evt.which > 57)
{
evt.preventDefault();
}
});
// 0 for null values
// 8 for backspace
// 48-57 for 0-9 numbers
Also in JavaScript:
- merge 2 arrays jquery
- validate form in reactstrap modal api
- getboundingclientrect() javascript
- json to pandas dataframe
- jquery populate select from json
- open pdf in browser javascript
- how to get unique values from array in javascript without duplicate value
- how to animate array oy react elements
- vector
- nativescript vue get native from ref
- cannot read property 'length' of undefined datatables ajax
- docker node label add
- chartjs lineTension
- array reverse algorithm in js
- javascript set select option
- fullcalendar reload events ajax
- copy to clipboard javascript
- lookup in mongodb array
- get index of element in array javascript
- combine p5 with react
- javascript detect if the browser tab is active
- javascript given range how to make sure array contains all values?
- file-loader support json file
- javascript date