<html>
<head>
<script language='javascript'>
function convertNum() {
var number = document.test.number.value;
var length_of_number = number.length;
var new_number = '';
for(position=0; position < length_of_number; position++){
new_number += number.substring(position,position+1);
if(((length_of_number - position-1)%3) == 0 && (length_of_number-position-1) > 0 ) new_number += ',';
}
document.test.new_number.value = new_number;
}
</script>
</head>
<body>
<form name=test>
정수형 숫자를 넣으시면 세자리마다 컴마(쉽표)를 찍어줍니다.<br>
소숫점이 있는 숫자는 안됩니다.<br>
변환전 수치 : <input name=number onKeyup="convertNum();"><br>
변환된 수치 : <input name=new_number>
</form>
</body>
</html>