Programming/Javascript

[jQuery]세 자리마다 콤마 찍기 number format

옥수수빵 2020. 2. 17. 13:42
728x90
<script src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/df-number-format/2.1.6/jquery.number.min.js"></script>
<script>
$(function() {
	$("#with-commas").text($.number(123456789));
});
</script>
<div id="with-commas"></div>

 

반응형