아래소스를 <head>와</head>사이에 넣어줍니다.

<script language="JavaScript">
var imgObj = new Image();
function showImgWin(imgName) {
imgObj.src = imgName;
setTimeout("createImgWin(imgObj)", 100);
}
function createImgWin(imgObj) {
if (! imgObj.complete) {
setTimeout("createImgWin(imgObj)", 100);
return;
}
imageWin = window.open("", "imageWin",
"width=" + imgObj.width + ",height=" + imgObj.height);
imageWin.document.write("<html><body style='margin:0'>");
imageWin.document.write("<img src='" + imgObj.src + "'>");
imageWin.document.write("</body><html>");
imageWin.document.title = imgObj.src;
}
</script>

<body>와</body>사이에 넣어줍니다

<a href="javascript:showImgWin('이미지주소')">이미지 보기</a>

<a href="javascript:history.go(1)">
앞으로</a>


<a href="javascript:history.go(0)">
<a href="javascript:history.reload()">
새로고침</a>


<a href="javascript:history.go(-1)">
<a href="javascript:history.back()">
뒤로</a>


<a href="#close" ="javascript:window.close();">
종료</a>


<a href="javascipt:main.save();">저장</a>


<img src=이미지경로 ="document.form.reset()" alt="취소">취소


<a href="#" ="Location.reload();">새로고침</a>

<input type="button" value="새로고침" ="javascript:window.Location!.reload()">새로고침버튼


<a href="javascript:window.print()">인
쇄</a>

(DIV를 이용해서 하면 좋다고 한다.)
 if (/MSIE/.test(navigator.userAgent)) {
     //Explorer 7이상일때
     if(navigator.appVersion.indexOf("MSIE 7.0")>=0) {
     window.open('about:blank','_self').close();
     }
     //Explorer 7이하일때
     else {
     window.opener = self;
     self.close();
     }
  }

+ Recent posts