jquery only number allowed to 10 digit
<script type="text/javascript">
$(document).ready(function() {
$("#phone_work").attr("maxlength", "10");
$("#phone_work").keypress(function(e) {
var kk = e.which;
if(kk < 48 || kk > 57)
e.preventDefault();
});
});
</script>
Also in JavaScript:
- setinterval jquery
- javascript function return boolean
- javascript canvas reset transform
- save object in localstorage shows [object Object]
- less than equal to in javascript
- array of images javascript
- fetch json file
- js key in dict
- redux connect
- tolocalestring javascript currency fixing 2 decimal places
- swap function javascript
- javascrip check if string contains substring
- check if a key exists in an object javascript
- how to code a check age function in javascript
- how to export csv file in angularjs
- index of value in array
- random number generator js
- firebase timestamp to date angular
- array index javascript show only first 2 elements
- javascript change page title
- javascript get index of object with value in array
- sendfile express syntax
- clear timeout js
- reactnode prop-types