HTML에 얹지않고, image만 경로로 잡아서, 팝업을 띄울만한 소스가 필요했습니다.
검색으로 얻어진 몇가지 소스를 병합해봤습니다.
불여우도 잘 되네요.^^
<html>
<head>
<title> HTML에 얹히지 않은 이미지팝업(화면 중앙으로) </title>
<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;
}
var pop_left = parseInt((screen.availWidth/2) - (imgObj.width/2));
var pop_top = parseInt((screen.availHeight/2) - (imgObj.height/2));
imageWin = window.open("", "_blank","width=" + imgObj.width + ",height=" + imgObj.height + ",top="+pop_top+",left="+pop_left+",toolbar='no',location='no',directories='no',status='no',menubar='no',scrollbars='no',resizable='no'");
imageWin.document.writeln("<html>");
imageWin.document.writeln("<head>");
imageWin.document.writeln("<title>기본 화면 Title</title>");
imageWin.document.writeln("</head>");
imageWin.document.writeln("<body leftmargin='0' marginwidth='0' topmargin='0' marginheight='0' onDragStart='return false' onSelectStart='return false' style='margin:0;'>");
imageWin.document.writeln(" <img src='" + imgObj.src + "' border='0' onClick='window.close();'>");
imageWin.document.writeln("</body>");
imageWin.document.writeln("<html>");
// imageWin.document.title = imgObj.src; //Title을 이미지 경로로 맞춘다면 주석해제!!!
}
-->
</script>
</head>
<body>
<!-- -->
<a href="JavaScript:showImgWin('이미지위치/이미지명');">팝업띄우기</a>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
검색으로 얻어진 몇가지 소스를 병합해봤습니다.
불여우도 잘 되네요.^^
<html>
<head>
<title> HTML에 얹히지 않은 이미지팝업(화면 중앙으로) </title>
<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;
}
var pop_left = parseInt((screen.availWidth/2) - (imgObj.width/2));
var pop_top = parseInt((screen.availHeight/2) - (imgObj.height/2));
imageWin = window.open("", "_blank","width=" + imgObj.width + ",height=" + imgObj.height + ",top="+pop_top+",left="+pop_left+",toolbar='no',location='no',directories='no',status='no',menubar='no',scrollbars='no',resizable='no'");
imageWin.document.writeln("<html>");
imageWin.document.writeln("<head>");
imageWin.document.writeln("<title>기본 화면 Title</title>");
imageWin.document.writeln("</head>");
imageWin.document.writeln("<body leftmargin='0' marginwidth='0' topmargin='0' marginheight='0' onDragStart='return false' onSelectStart='return false' style='margin:0;'>");
imageWin.document.writeln(" <img src='" + imgObj.src + "' border='0' onClick='window.close();'>");
imageWin.document.writeln("</body>");
imageWin.document.writeln("<html>");
// imageWin.document.title = imgObj.src; //Title을 이미지 경로로 맞춘다면 주석해제!!!
}
-->
</script>
</head>
<body>
<!-- -->
<a href="JavaScript:showImgWin('이미지위치/이미지명');">팝업띄우기</a>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
댓글 1개
19년 전
굿입니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4049 | |
| 29 |
아우겐나이스
|
21년 전 | 4436 | |
| 28 |
아우겐나이스
|
21년 전 | 3462 | |
| 27 | 21년 전 | 5833 | ||
| 26 | 21년 전 | 3107 | ||
| 25 | 21년 전 | 6079 | ||
| 24 | 18년 전 | 3647 | ||
| 23 | 21년 전 | 3639 | ||
| 22 | 21년 전 | 4247 | ||
| 21 | 21년 전 | 3817 | ||
| 20 | 21년 전 | 4224 | ||
| 19 | 21년 전 | 6678 | ||
| 18 | 21년 전 | 4733 | ||
| 17 | 21년 전 | 6989 | ||
| 16 | 21년 전 | 4169 | ||
| 15 | 21년 전 | 2631 | ||
| 14 | 21년 전 | 4977 | ||
| 13 | 21년 전 | 3399 | ||
| 12 |
Recluse
|
21년 전 | 3878 | |
| 11 |
아우겐나이스
|
21년 전 | 3568 | |
| 10 |
Recluse
|
21년 전 | 3392 | |
| 9 | 21년 전 | 3985 | ||
| 8 | 21년 전 | 5169 | ||
| 7 | 21년 전 | 4760 | ||
| 6 | 21년 전 | 5682 | ||
| 5 | 21년 전 | 4113 | ||
| 4 | 21년 전 | 4837 | ||
| 3 | 21년 전 | 4740 | ||
| 2 | 21년 전 | 3240 | ||
| 1 | 22년 전 | 4338 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기