HTML에 얹히지 않은 이미지팝업(화면 중앙으로)
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년 전
굿입니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 132 | |
| 128 |
HTML
사진을 액자에 넣기(액자 만들기)
3
|
| 126 |
HTML
초간단 스크롤
1
|
| 125 |
HTML
잘되는 센드메일 수신이 안될때...
|
| 122 | |
| 121 |
HTML
textarea 에 Tab기능 넣기
|
| 120 |
HTML
자바스크립트 오류 메시지 감추기
|
| 119 | |
| 118 |
HTML
삼바 설정 간단 쉬운 쉽게
|
| 114 | |
| 108 |
HTML
특수문자 모음
5
|
| 107 |
HTML
mqueue 설정(센드메일속도 UP)
|
| 104 | |
| 102 | |
| 100 |
HTML
패스선택툴
1
|
| 98 |
HTML
작업내역 브러쉬
1
|
| 92 |
HTML
닷지툴
5
|
| 88 |
HTML
일러스트 메뉴얼.
3
|
| 77 |
HTML
첫 게시물..^^ 포토샵 단축키
10
|
| 76 | |
| 75 | |
| 74 |
HTML
콘솔의 화면보호기능을 끄려면?
|
| 73 |
HTML
스왑 사용 안하기
|
| 71 | |
| 70 |
HTML
문자열 연결 CONCAT()
|
| 68 | |
| 67 |
HTML
디렉토리 관련함수 [퍼옮]
|
| 66 |
HTML
setcookie
|
| 63 |
HTML
eregi() vs ereg()
2
|
| 62 |
HTML
man 페이지 txt파일로 저장하기
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기