...","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개

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

프로그램

+
제목 글쓴이 날짜 조회
12년 전 조회 2,803
12년 전 조회 7,914
12년 전 조회 2,436
12년 전 조회 2,434
12년 전 조회 2,490
12년 전 조회 2,108
12년 전 조회 4,350
12년 전 조회 2,887
12년 전 조회 2,919
12년 전 조회 2,452
12년 전 조회 4,107
12년 전 조회 3,110
12년 전 조회 1,875
12년 전 조회 4,979
12년 전 조회 2,448
12년 전 조회 2,230
12년 전 조회 2,639
12년 전 조회 6,972
12년 전 조회 2,607
12년 전 조회 4,203
12년 전 조회 3,663
12년 전 조회 1,923
12년 전 조회 4,368
12년 전 조회 2,833
12년 전 조회 2,755
12년 전 조회 2,798
12년 전 조회 4,705
12년 전 조회 3,503
12년 전 조회 5,135
12년 전 조회 9,998
12년 전 조회 5,598
12년 전 조회 5,185
12년 전 조회 2,777
12년 전 조회 2,848
12년 전 조회 4,602
12년 전 조회 5,426
12년 전 조회 5,828
12년 전 조회 3,035
12년 전 조회 2,740
12년 전 조회 2,372
12년 전 조회 2,398
12년 전 조회 4,166
12년 전 조회 4,174
12년 전 조회 2,708
12년 전 조회 4,261
12년 전 조회 2,707
12년 전 조회 9,768
12년 전 조회 3,007
12년 전 조회 5,203
12년 전 조회 7,831
12년 전 조회 3,006
12년 전 조회 4,301
12년 전 조회 2,020
12년 전 조회 2,695
12년 전 조회 2,550
12년 전 조회 2,737
12년 전 조회 4,738
12년 전 조회 2,531
12년 전 조회 3,248
12년 전 조회 2,668
12년 전 조회 2,349
12년 전 조회 2,801
12년 전 조회 3,543
12년 전 조회 2,762
12년 전 조회 2,566
12년 전 조회 3,125
12년 전 조회 1.6만
12년 전 조회 2,391
12년 전 조회 2,189
12년 전 조회 3,999
12년 전 조회 1만
12년 전 조회 2,569
12년 전 조회 2,506
12년 전 조회 2,947
12년 전 조회 2,407
12년 전 조회 2,585
12년 전 조회 4,843
12년 전 조회 2,786
12년 전 조회 3,449
13년 전 조회 2,446
13년 전 조회 2,619
13년 전 조회 4,340
13년 전 조회 2,182
13년 전 조회 2,683
13년 전 조회 2,987
13년 전 조회 3,435
13년 전 조회 3,542
13년 전 조회 3,992
13년 전 조회 2,454
13년 전 조회 2,461
13년 전 조회 5,848
13년 전 조회 2,901
13년 전 조회 3,070
13년 전 조회 6,943
13년 전 조회 4,644
13년 전 조회 3,568
13년 전 조회 2,742
13년 전 조회 4,926
13년 전 조회 3,929
13년 전 조회 3,611