파일 첨부폼에서 "찾아보기" 스타일 부탁합니다. 정보
파일 첨부폼에서 "찾아보기" 스타일 부탁합니다.본문
댓글 전체

ff와 ie 둘다 됩니다. 백그라운드로 깔고 실제버튼은 알파효과로 투명처리 합니다.
<style type="text/css">
.file {width:75px; height:21px;}
.file_find {margin-left:5px; position:relative; overflow:hidden; left:0; top:0; width:75px; height:21px; background:url('./img/btn_file_find.gif') no-repeat; float:left;}
</style>
<div style="float:left;"><input type="text" id="file_name0" class="input1" style="width:235px; height:21px;" /></div>
<div class="file_find"><input type="file" id="file0" name="upload_file[0]" size="0" class="file" /></div>
<script type="text/javascript">
var AppName = navigator.appName;
if (AppName == 'Microsoft Internet Explorer') {
document.getElementById("file0").style.filter = "alpha(opacity:0);";
} else {
document.getElementById("file0").style.opacity = "0";
}
</script>
<script type="text/javascript">
function fileFind(id)
{
document.getElementById("file_name"+id).value = document.getElementById("file"+id).value;
}
function fileAdd()
{
fileFind('0');
}
document.onmouseover = fileAdd;
document.onmouseout = fileAdd;
</script>