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년 전
굿입니다.
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5502 | 11년 전 | 3874 | ||
| 5501 | 11년 전 | 1156 | ||
| 5500 |
잘살아보자
|
11년 전 | 916 | |
| 5499 |
kiplayer
|
11년 전 | 7449 | |
| 5498 |
잘살아보자
|
11년 전 | 2318 | |
| 5497 |
잘살아보자
|
11년 전 | 1138 | |
| 5496 |
잘살아보자
|
11년 전 | 1176 | |
| 5495 |
잘살아보자
|
11년 전 | 967 | |
| 5494 |
잘살아보자
|
11년 전 | 4567 | |
| 5493 |
잘살아보자
|
11년 전 | 689 | |
| 5492 |
잘살아보자
|
11년 전 | 5246 | |
| 5491 |
잘살아보자
|
11년 전 | 3387 | |
| 5490 | 11년 전 | 1206 | ||
| 5489 |
|
11년 전 | 3281 | |
| 5488 |
잘살아보자
|
11년 전 | 2826 | |
| 5487 |
잘살아보자
|
11년 전 | 2205 | |
| 5486 |
잘살아보자
|
11년 전 | 1446 | |
| 5485 |
잘살아보자
|
11년 전 | 1456 | |
| 5484 |
잘살아보자
|
11년 전 | 2344 | |
| 5483 |
잘살아보자
|
11년 전 | 3251 | |
| 5482 |
잘살아보자
|
11년 전 | 1136 | |
| 5481 |
잘살아보자
|
11년 전 | 747 | |
| 5480 |
잘살아보자
|
11년 전 | 1370 | |
| 5479 |
잘살아보자
|
11년 전 | 687 | |
| 5478 |
잘살아보자
|
11년 전 | 1271 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기