...","url":"https://sir.kr/boards/program/18862","author":{"@type":"Person","name":"senseme","url":"https://sir.kr/profile/fd8d8956-5b99-4cbc-9e08-367f8488486f"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"datePublished":"2013-03-28T19:24:58+09:00","dateModified":"2013-04-05T10:15:37+09:00","comment":[{"@type":"Comment","text":"잘봤어요~","author":{"@type":"Person","name":"쉽다zzz"},"datePublished":"2013-04-04T09:40:53+09:00"},{"@type":"Comment","text":"네~~","author":{"@type":"Person","name":"senseme"},"datePublished":"2013-04-05T01:38:57+09:00"},{"@type":"Comment","text":"깨알 지식 감사합니다 ㅎㅎ","author":{"@type":"Person","name":"강턱"},"datePublished":"2013-04-05T10:15:37+09:00"}]}
s

첨부파일 확장자 체크 [정규식]

파일 첨부 시 첨부파일 확장자가 이미지 파일인지 체크 하는 스크립트 입니다.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<title>확장자 검사</title>
<script language=javascript>

function checkExt()
{
var IMG_FORMAT = "\.(bmp|gif|jpg|jpeg|png)$"; //문서만 첨부하게 하려면 이 부분 바꿔주시면 되겠죠? ^^

if((new RegExp(IMG_FORMAT, "i")).test(document.form1.text1.value)) return true;

alert("이미지 파일만 첨부하실 수 있습니다. ");

return false;
}

</script>
</head>
<body>
<form name="form1" method="post" onsubmit="return checkExt()" encType="multipart/form-data">
<input type="file" name="text1">
<input type="submit">
</form>
</body>
</html>

|

댓글 3개

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

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
12년 전 조회 2,784
12년 전 조회 7,894
12년 전 조회 2,417
12년 전 조회 2,411
12년 전 조회 2,467
12년 전 조회 2,082
12년 전 조회 4,325
12년 전 조회 2,861
12년 전 조회 2,895
12년 전 조회 2,426
12년 전 조회 4,084
12년 전 조회 3,089
12년 전 조회 1,858
12년 전 조회 4,948
12년 전 조회 2,430
12년 전 조회 2,208
12년 전 조회 2,614
12년 전 조회 6,947
12년 전 조회 2,584
12년 전 조회 4,186
12년 전 조회 3,646
12년 전 조회 1,888
12년 전 조회 4,336
12년 전 조회 2,804
12년 전 조회 2,726
12년 전 조회 2,773
12년 전 조회 4,681
12년 전 조회 3,477
12년 전 조회 5,113
12년 전 조회 9,975
12년 전 조회 5,576
12년 전 조회 5,166
12년 전 조회 2,746
12년 전 조회 2,832
12년 전 조회 4,570
12년 전 조회 5,396
12년 전 조회 5,802
12년 전 조회 3,007
12년 전 조회 2,718
12년 전 조회 2,345
12년 전 조회 2,371
12년 전 조회 4,142
12년 전 조회 4,149
12년 전 조회 2,683
12년 전 조회 4,242
12년 전 조회 2,684
12년 전 조회 9,755
12년 전 조회 2,983
12년 전 조회 5,182
12년 전 조회 7,802
12년 전 조회 2,982
12년 전 조회 4,277
12년 전 조회 1,998
12년 전 조회 2,668
12년 전 조회 2,536
12년 전 조회 2,708
12년 전 조회 4,712
12년 전 조회 2,511
12년 전 조회 3,225
12년 전 조회 2,651
12년 전 조회 2,330
12년 전 조회 2,783
12년 전 조회 3,517
12년 전 조회 2,738
12년 전 조회 2,541
12년 전 조회 3,099
12년 전 조회 1.6만
12년 전 조회 2,367
12년 전 조회 2,175
12년 전 조회 3,977
12년 전 조회 1만
12년 전 조회 2,546
12년 전 조회 2,487
12년 전 조회 2,927
12년 전 조회 2,388
12년 전 조회 2,558
12년 전 조회 4,822
12년 전 조회 2,764
12년 전 조회 3,426
12년 전 조회 2,418
12년 전 조회 2,594
13년 전 조회 4,319
13년 전 조회 2,161
13년 전 조회 2,652
13년 전 조회 2,963
13년 전 조회 3,404
13년 전 조회 3,514
13년 전 조회 3,962
13년 전 조회 2,421
13년 전 조회 2,437
13년 전 조회 5,814
13년 전 조회 2,876
13년 전 조회 3,045
13년 전 조회 6,926
13년 전 조회 4,618
13년 전 조회 3,536
13년 전 조회 2,724
13년 전 조회 4,903
13년 전 조회 3,892
13년 전 조회 3,578