아래와 같이 파일 업로드시 찾아보기... 버튼을 이미지로 바꿀 수 있는 팁입니다.

기존에 div등을 이용한 팁이 있지만, jQuery로 간단하게 적용할 수 있습니다.

변경전 :

사용자 삽입 이미지

변경후 :

사용자 삽입 이미지

사용방법 :

1. 첨부파일을 다운 받습니다.

2. 다음 두개의 스크립트 파일을 인클루드 시킵니다.


<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.filestyle.js" type="text/javascript"></script>


3. 적당한 곳에 다음 코드를 입력합니다.


$("input[type=file]").filestyle({
     image: "choose-file.gif",
     imageheight : 22,
     imagewidth : 82,
     width : 250
});

2009/07/16 18:22 2009/07/16 18:22

Trackback Address :: https://youngsam.net/trackback/566