첫번째 방법..,,.. function img_filetype_view() { img_views = "view_" + event.srcElement.name.split("file")[1]; if(event.srcElement.value.match(/(.jpg|.jpeg|.gif|.png|.bmp|.pdf)$/)) { document.images[img_views].src = event.srcElement.value; document.images[img_views].style.display = ""; } else { document.images[img_views].style.display = "none"; } } 두번째 방법..,,.. - 펌 - http://suldo.zotta.net/ function ..