javascript - Internet Explorer 11 : Object doesn't support property or method 'isInteger' -
i have error in internet explorer console ' object doesn't support property or method 'isinteger' ' how can resolve ?
code:
function verificanota(nota){ if (nota.length>0){ var arr = []; if( nota.indexof(".") != -1 ){ return ferificarearraynote(nota.split('.')); }else if( nota.indexof(",") != -1 ){ ferificarearraynote(nota.split(',')); }else if( nota.length<=2 && number.isinteger(number(nota)) && number(nota)<=10 && number(nota) > 0){ return true; }else { return false; } } return true; }
and yes, pass number not char;
as stated @andreas, number.isnumber part of es6 not supported ie11
you can add following polyfill javasript
number.isinteger = number.isinteger || function(value) { return typeof value === "number" && isfinite(value) && math.floor(value) === value; };
source: https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/number/isinteger
Comments
Post a Comment