function functionAmount(e) { if (window.event) { code = event.keyCode; if ((code >= 48 && code <= 57) || code == 46) { } else { event.returnValue = false; } } else { code = e.which; if ((code >= 48 && code <= 57) || code == 8 || code == 0 || code == 46) { if (code >= 48 && code <= 57) { } } else { e.preventDefault(); } } }
Thursday, November 15, 2012
onkeypress should not accept alpha charecters
function functionAmount(e) { if (window.event) { code = event.keyCode; if ((code >= 48 && code <= 57) || code == 46) { } else { event.returnValue = false; } } else { code = e.which; if ((code >= 48 && code <= 57) || code == 8 || code == 0 || code == 46) { if (code >= 48 && code <= 57) { } } else { e.preventDefault(); } } }
Subscribe to:
Post Comments (Atom)
Javascript find highest and lowest from the given inputs
function highAndLow(numbers){ // numbers = "4 5 29 54 4 0 -214 542 -64 1 -3 6 -6" let numbersInArr = numbers.split(' ...
-
function highAndLow(numbers){ // numbers = "4 5 29 54 4 0 -214 542 -64 1 -3 6 -6" let numbersInArr = numbers.split(' ...
-
HTML Jquery $("#num").keypress(function (e){ var charCode = (e.which) ? e.which : e.keyCode; if (charCode > 31 ...
-
//Change the port connect: { options: { port: 8080 , // change this to '0.0.0.0' to a...
No comments:
Post a Comment