what is a function that checks if a string is integer or not like a method:
jQuery.isNumeric()
I want to check the html input element:
<input id='distance' type='text' />
early
Thanks for your contributions, I found the answer:
if(Math.floor($('#distance').val()) == $('#distance').val() && $.isNumeric($('#distance').val())) { alert('yes its an int!'); }
I use this
function IsInteger(n){ return Number(n) === n && n % 1 === 0; }
Sorry, I didn’t notice the integer when I answered, here is another type check:
if($.type($(#distance).val())==="number")
see: http://api.jquery.com/jquery.type/
Source: https://habr.com/ru/post/975137/More articles:Error performing periodic synchronization - androidOne interesting sample - design-patternsTime conversion in milliseconds from an era to "mm / dd / yy" - javaEnabling code editing while an application is running in Visual Studio (WP8) - debuggingBackgroundSession SessionDownloadTask when locking the screen, Error: NSPOSIXErrorDomain Code = 1 - iosGulp: Compiling Stylus and concat with pure CSS - cssNGINX: Serve ONLY specific file types in all directories - linuxXIO: Fatal I / O Error 11 - coreCalculation of mutual information in R - rhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/975142/convert-rstudio-presentation-rpres-to-rmarkdown-presentation-rmd&usg=ALkJrhheg7n3Bedwmn0x22IO20GT4GY69AAll Articles