테스트 사이트 - 개발 중인 베타 버전입니다

상품구매시 수량조절 채택완료

star3840 9년 전 조회 5,142

상품구매시 수량버튼의 증가나 감소를 누를때 1단위가 아닌 100단위로 운영하려고 합니다.

100일때 증가를 누르면 200 더 누르면 300 이런식으로요

어떤 소스를 수정하면 가능한가요?

 

 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

돌아온헌이

</p><p><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);"><script type="text/javascript"></span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">////////////////////////////////////////</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 숫자를 몇 퍼센트 증가</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 공식은 '숫자 * (1 + 퍼센트 / 100)'</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">////////////////////////////////////////</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 100을 10퍼센트 증가</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">var result;</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">result = 100 * (1 + 10 / 100);</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write(result, '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: 110.00000000000001</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 정확히 110 이 되어야 하지만, 깔끔하지 못하게 출력되었습니다.</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 100을 100퍼센트 증가</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write( 100 * (1 + 100 / 100) , '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: 200</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 100을 200퍼센트 증가 (100의 200% 증가는, 200이 아니라 300입니다)</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write( 100 * (1 + 200 / 100) , '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: 300</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 1548을 66퍼센트 증가</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">result = 1548 * (1 + 66 / 100);</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write(roundXL(result, 2), '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: 2569.68</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 이번에는 2569.6800000000003 이런 값이 나오기에</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// roundXL함수를 사용하여, 소수점 2자리까지만 나오게 했음</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 6500을 15퍼센트 증가</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">result = 6500 * (1 + 15 / 100);</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write(roundXL(result, 2), '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: 7475</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 탁상용 계산기는, '6500 + 15%'로 계산 가능</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">////////////////////////////////////////</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 숫자를 몇 퍼센트 감소</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 공식은 '숫자 * (1 - 퍼센트 / 100)'</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">////////////////////////////////////////</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 100을 10퍼센트 감소</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">result = 100 * (1 - 10 / 100);</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write(result, '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: 90</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 100을 200퍼센트 감소</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">result = 100 * (1 - 200 / 100);</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write(result, '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: -100</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 1548을 66퍼센트 감소</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">result = 1548 * (1 - 66 / 100);</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write(roundXL(result, 2), '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: 526.32</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 7600을 25퍼센트 감소</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">document.write( 7600 * (1 - 25 / 100) , '
');</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 출력 결과: 5700</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 탁상용 계산기는, '7600 - 25%'로 계산 가능</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 엑셀 스타일의 반올림 함수 정의</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 자바스크립트는 실수 출력에 좀 문제가 있어서</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">// 이런 함수를 사용하여, 숫자를 다듬어 주어야 합니다</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">function roundXL(n, digits) {</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">  digits = Math.pow(10, digits);</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">  return Math.round(n * digits) / digits;</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">}</span><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><br style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap;"><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);"></script></span> </p><p><span style="color: rgb(85, 85, 68); font-family: DotumChe, monospace; font-size: 13.3333px; line-height: 16.8px; white-space: nowrap; background-color: rgb(226, 226, 255);">

참고 하세요 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

s
star3840
9년 전
헌이님 감사합니다.~ ^^ 저 소스는 어느폴더의 파일을 수정하는건지 파일명좀 부탁드립니다.
초보라서요^^;;

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인