/**
* 이미지 크게 보기
*/
function pop(img) {
var win = window.open('', 'Detail', 'width=0, height=0, menubar=0, toolbar=0, directories=0, scrollbars=1, status=0, location=0, resizable=1');
op="<html><head><title>크게 보기</title></head>";
op+="<body leftmargin='0' topmargin='0'>";
op+="<img src='"+ img.src +"' border='0' style='cursor:pointer' onclick='window.close();' onload='window.resizeTo(this.width+30, this.height+90); window.moveTo( (screen.width-this.width)/2 , (screen.height-this.height)/2-50 )'>";
op+="</body></html>";
win.document.write(op);
}
------------------------------------------------ 사용법 ------------------------------------------------
<img id="i1" width="200" height="120" src='/mvis/jsp/mm/JAMM214.do?workType=VP&mldSeq=<bean:write name="record0" property="mldSeq" />&fileSeq=1' onError="this.style.visibility='hidden'" style="cursor:hand" onclick="pop(this)">
'JavaScript' 카테고리의 다른 글
[JavaScript] Javascript 에서 reload (0) | 2010.10.27 |
---|---|
[Script] display 옵션의 'none' 과 'inline' 과 'block'의 차이점 (0) | 2010.09.01 |
[Script] 이미지(img) 엑박 안뜨게 하기!! (0) | 2010.07.15 |
[script] 작은 이미지 원본 이미지로 보이기 (0) | 2010.05.06 |
[Script] title 이나 alt 속성의 tooltip size 조정 (0) | 2010.04.28 |