type numeric value only in textbox javascript
<input type="text" class="textfield" value="" id="extra7" name="extra7" onkeypress="return isNumber(event)" />
function isNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
return true;
}
Also in JavaScript:
- clean collection mongoose
- angular get current route
- how to connect react to backend
- email validation in javascript
- How to append to a file in Node?
- vuejs filter array by dates
- Cannot deserialize the current JSON array (e.g. [1,2,3]) into type
- get mouse position javascript
- how to append value to input field using jquery
- javascript array map stack
- how to check element has event or not in jquery
- javascript download current html page
- jquery each has class
- array methods in javascript
- how to show multiple image preview in jquery
- react native layout animation
- javascript construct new object
- page is loading from previous page scroll in reactjs
- add 2 for hours in date timestamp js
- debugger js
- angular usehash not working
- How to make remove buttoon on table using js DOM
- query selector click event
- cypress fixture