Laboratory/Develop

이미지 파일 미리보기(?)

theking 2009. 1. 1. 00:48


[script language="javascript"]
function Preview() {
 var frm = document.frm1;


 if(frm.art_file.value.length==0)
 {
  return;
 }
 frm.imgPreview.src = frm.art_file.value;
}

[/script]

[form name="frm1" id="frm1"]

[input type="file" id="art_file" name="art_file" onfocus='javascript:Preview();']
[img src="" name="imgPreview" id="imgPreview"]
[/form]