//소숫점이 존재할 경우
if(isNaN(flt) == false && Number.isInteger(flt)==false)
{
//구현하기
}
// isInteger는 es6 임. ie 11 에서는 안되므로 함수 만듬.
Number.isInteger = Number.isInteger || function(value) {
return typeof value === "number" &&
isFinite(value) &&
Math.floor(value) === value;
};
참고자료 : https://stackoverflow.com/a/31720368
Internet Explorer 11 : Object doesn't support property or method 'isInteger'
i have this error in internet explorer console ' Object doesn't support property or method 'isInteger' ' how can i resolve it ? code: function verificaNota(nota){ if (nota.length>0){ ...
stackoverflow.com
https://poiemaweb.com/js-number
Number | PoiemaWeb
Number 객체는 원시 타입 number를 다룰 때 유용한 프로퍼티와 메소드를 제공하는 레퍼(wrapper) 객체이다. 변수 또는 객체의 프로퍼티가 숫자를 값으로 가지고 있다면 Number 객체의 별도 생성없이 Numbe
poiemaweb.com
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.7.0/polyfill.js"></script>
//소숫점이 존재할 경우
if(isNaN(flt) == false && Number.isInteger(flt)==false)
{
//구현하기
}
javascript 로 page 별 timeout 설정하여 로그아웃 강제시키기 (0) | 2019.08.30 |
---|---|
javascript 숫자 8자리 형식을 년-월-일 형식으로 보이기 (0) | 2019.05.10 |
javascript 로 숫자에 소수점 여부 확인하기 (2) | 2019.01.07 |
javascript datetime 날짜 json 값을 년-월-일 시:분:초 형태로 표기 (0) | 2018.11.29 |
javascript 로 guid 만들기 (0) | 2018.05.08 |
javascript 하이라이트 라이브러리 highlight.js (0) | 2018.01.23 |
본문과 관련 있는 내용으로 댓글을 남겨주시면 감사하겠습니다.