티스토리 뷰
//합계 계산하기
frmView.selectAmount.value=TotFee.setComma();
frmView.shipFee.value=shipFee.setComma();
frmView.lectureDiscount.value=lectureDiscountAmount.setComma();
document.getElementById('selItemPrice').innerHTML=(TotFee+shipFee-lectureDiscountAmount).setComma();
이런식으로 처리했음.
그렇다면 setComman(); 를 알아봐야지.
//-----------------------------------------------------------------------------
// 3자리마다 콤마찍기(문자변수일때)
// @return : String
//-----------------------------------------------------------------------------
String.prototype.setComma=function(){
return this.replace(/(\d)(?=(?:\d{3})+(?!\d))/g,'$1,');
}
//-----------------------------------------------------------------------------
// 3자리마다 콤마찍기(숫자값일때_)
// @return : String
//-----------------------------------------------------------------------------
Number.prototype.setComma=function(){
return this.toString().replace(/(\d)(?=(?:\d{3})+(?!\d))/g,'$1,');
}
이렇게 처리되었음
- Total
- Today
- Yesterday
- 윈드러너
- Select case
- gt-s55
- 태그를 입력해 주세요.
- 이북 만들기
- 글리 시즌1
- classic asp
- 퍼시픽 림
- html
- awake
- 구디 스파게티
- costco 광명점
- asp
- 그레이 아나토미 시즌1
- 구로디지털단지역 맛집
- 애플 이벤트
- 겨울왕국
- 가입한 보험조회
- 안드레기
- 구디 포차
- 가산 하이힐
- Frozen
- 구로디지털 포차
- asp 숫자
- 구로디지털단지역
- CSS
- 대륭포스트타워7차
- 엑스페리아 타블렛 Z
- 북 스캐너
- 롯데씨네마
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |