파일첨부를 div+css 로 변경하기
1. 소스변경
skin/board/폴더/write.skin.php 의objCell.innerHTML = "<input type='file' class='ed' name='bf_file[]' title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'>";
부분을
objCell.innerHTML = "<input type=\"text\" name=\"file_path"+flen+"\" class=\"jy_input_box\" disabled=\"disabled\" style=\"width:270px;\" /><div id=\"file_search\" class=\"jy_file_search_warp\"><input type=\"file\" name=\"bf_file[]\" class=\"file_search\" onmouseout=\"file_path"+flen+".value=this.value;\" onchange=\"file_path"+flen+".value=this.value\" title=\"파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능\"></div><div style=\"height:10px; clear:both;\"></div>";
로 변경하기
2. css 추가
write.skin.php 의 상단에 css 추가<style type="text/css">
.jy_file_search_warp {position:relative; display:inline; float:left; width:64px; height:24px; background:url(http://도메인/skin/board/스킨폴더/img/file_search.gif) left top no-repeat; overflow:hidden; cursor:pointer;}
.jy_file_search_warp .file_search {position:absolute; top:0; right:0; width:59px; height:24px; font-size:20px; opacity:0; filter:alpha(opacity=0); cursor:pointer; border:1px solid #ffffff;}
.jy_input_box {float:left; border:1px solid #D2D2D2; margin:0; _margin:-1px 0 -1px 0; padding:4px 3px 3px 5px !important; background-color:#FFFFFF;}
</style>
3. 이미지(첨부) 업로드
skin/board/스킨폴더/img 에 업로드
도움되었으면 추천~! 추천~! 추천~! 추천~!
첨부파일
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 8개
시간나면 더 이쁘게 만드는 팁 올리도록 하겠습니다.