<SCRIPT LANGUAGE="JavaScript">
<!--
function Format_Comma(f){
str = f.value;
if(str == ""){
return;
} else {
var newValue = str + "";
var len = newValue.length;
var ch = "";
var j = 1;
var formatValue = "";
len = newValue.length;
for (i = len; i>0; i--){
ch = newValue.substring(i-1, i);
formatValue = ch + formatValue;
if((j % 3) == 0 && i > 1) {
formatValue = "," + formatValue;
}
j++;
}
}
f.value = formatValue;
}
function Delete_Comma(f){
str = f.value;
if(str == ""){
return;
} else {
var result = ""
comma_pattern = /([\,]{1})/;
for(var i = 0; i < str.length; i++) {
if(comma_pattern.test(str.charAt(i))) {
result += str.charAt(i).replace(comma_pattern, "");
} else {
result += str.charAt(i);
}
}
}
f.value = result;
}
function SetNum(obj){
val=obj.value;
re=/[^0-9]/gi;
obj.value=val.replace(re,"");
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<form name="form1">
<input type="text" name="price" size="15" maxlength="10" onkeypress="javascript:SetNum(this)" onblur="javascript:SetNum(this); Format_Comma(this)" onfocus="javascript:Delete_Comma(this)">
</form>
번호 | 제목 | 날짜 | 조회 수 |
---|---|---|---|
61 | Server centos5 네트워크 설정 | ||
60 | Server centos5에서 부팅방법 결정 | ||
59 | Php date() 함수 사용법 | ||
58 | Mysql DB 내용 불러오기 | ||
57 | Mysql DB 전체 또는 특정 테이블 백업과 복원 | ||
56 | Mysql DB의 문자열을 한꺼번에 바꾸기 | ||
55 | Mysql DB자료 이전 | ||
54 | Server disk 마운트 | ||
53 | Web DNS 캐시 삭제 | ||
52 | Server Linux 서버에서 Disk 마운트 | ||
51 | Server Linux에서 DNS를 못 찾을 때 | ||
50 | Mysql Mysql 재시작 | ||
49 | Mysql mysql에 csv 파일 밀어넣기 | ||
48 | Windows Onedrive 동기화가 안 될 때 | ||
47 | Php php 4.x 반올림 에러 문제 해결 | ||
46 | Php php.ini 수정 | ||
45 | Etc Visual Studio 단축기(shortcut) | ||
44 | Web xe 설치하기 | ||
43 | Server Xshell에서 숫자 키패드가 안 먹힐 때 | ||
42 | Etc [Musescore] 사용 팁 |