<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function imgResize(img){
alert(img);
img1= new Image();
img1.src=(img);
imgControll(img);
}
function imgControll(img){
if((img1.width!=0)&&(img1.height!=0)){
viewImage(img);
}
else{
controller="imgControll('"+img+"')";
intervalID=setTimeout(controller,20);
}
}
function viewImage(img){
W=img1.width;
H=img1.height;
O="width="+W+",height="+H;
imgWin=window.open("","",O);
imgWin.document.write("<html><head><title>이미지 미리보기</title></head>");
imgWin.document.write("<body topmargin=0 leftmargin=0>");
imgWin.document.write("<img src="+img+" onclick='self.close()'>");
imgWin.document.close();
}
// -->
</script>
</HEAD>
<BODY>
<A HREF="javascript:imgResize('080222-0001.jpg')" BORDER="0"><IMG SRC="080222-0001.jpg" BORDER="0"
width=50 height=50></A>
</BODY>
</HTML>
'HTML & Script' 카테고리의 다른 글
event.keycode 코드표 (0) | 2008.10.15 |
---|---|
한글입력만 받아내기 (0) | 2008.10.15 |
실시간 숫자 콤마(comma) 찍기 (1) | 2008.03.06 |
referrer 레퍼러 출력해주기 (0) | 2008.03.06 |
타도메인간 iframe size 조절 (0) | 2008.03.06 |