아는 것이 좋은 것이다.

[jQuery] 파일첨부 버튼 이미지로 변경 본문

jQuery

[jQuery] 파일첨부 버튼 이미지로 변경

start0 2014. 5. 7. 14:28
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery.filestyle.js"></script>
<script type="text/javascript">
    jQuery(function ($) {
        $("input[type=file]").filestyle({
            image: "/160_1.gif",
            imageheight: 20,
            imagewidth: 66
        });
    }
</script>

<span id="fileInputForm" style="position:relative; float:left; width:62px; height:18px; overflow:hidden; cursor:pointer; background-image:url('/160_1.gif');">
<input type="file" id="filename" name="filename" value="" style='position:absolute; margin-left:-10px; width:62px; height:18px; filter:alpha(opacity=0); opacity:0; -moz-opacity:0; cursor:pointer;' onChange="fileUpload()">

</span>






Comments