Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- input
- disabled
- strpos
- php
- 시간계산
- File
- Selector
- 쿠키
- mysql
- strtotime
- Meta Tag
- CSS
- parent of iframe
- JQuery
- Javascript
- 세션사용법
- indexOf
- 이전주소
- date
- mb_strimwidth
- 세션
- SubString
- 웹프로그래밍
- 문자열포함여부
- attr
- accept
- HTML
- date포맷
- element추가
- ucfirst
Archives
- Today
- Total
목록toExponential (1)
Heojju
[JavaScript] 소수점 올림 / 버림 / 반올림 / 자리수 표기
▤ 소수점 올림 document.write(Math.ceil(123.456)+"\n"); //124 document.write(Math.ceil(123.567)+"\n"); //124 ▤ 소수점 버림 document.write(Math.floor(123.456)+"\n"); //124 document.write(Math.floor(123.567)+"\n"); //124 ▤ 소수점 반올림 document.write(Math.round(123.456)+"\n"); //123 document.write(Math.round(123.567)+"\n"); //124 ▤ toFixed : 숫자를 문자열로 변환하면서 지정된 소수점 이하 숫자를 반올림하여 출력 document.write((123.456).toFixed(..
카테고리 없음
2017. 8. 17. 13:33