Last active
October 27, 2016 19:25
-
-
Save raank/57ba54cbd9a75db66ba6968383125c4b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isNumber( $value ) { | |
var $inputs = document.getElementsByClassName('num-input'); | |
for ( i = 0; i <= $inputs.length; i++ ) | |
{ | |
if(!isNaN( $inputs[i].value )){ | |
exit(); | |
} else { | |
alert('O número digitado não é válido'); | |
$inputs[i].value = ""; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment