H

HTML에 얹히지 않은 이미지팝업(화면 중앙으로)

· 19년 전 · 2561 · 1
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>
|

댓글 1개

굿입니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
19년 전 조회 2,215
19년 전 조회 3,008
19년 전 조회 2,218
19년 전 조회 3,066
19년 전 조회 3,485
19년 전 조회 5,180
19년 전 조회 3,104
19년 전 조회 3,109
19년 전 조회 2,689
19년 전 조회 2,430
19년 전 조회 2,687
19년 전 조회 2,422
19년 전 조회 2,534
19년 전 조회 2,334
19년 전 조회 2,676
19년 전 조회 2,942
19년 전 조회 3,233
19년 전 조회 7,035
19년 전 조회 5,153
19년 전 조회 2,409
19년 전 조회 5,133
19년 전 조회 3,081
19년 전 조회 2,433
19년 전 조회 2,122
19년 전 조회 3,552
19년 전 조회 2,867
19년 전 조회 3,238
19년 전 조회 2,863
19년 전 조회 3,359
19년 전 조회 2,684
19년 전 조회 3,431
19년 전 조회 2,391
19년 전 조회 4,077
19년 전 조회 3,263
19년 전 조회 4,106
19년 전 조회 3,455
19년 전 조회 3,081
19년 전 조회 3,377
19년 전 조회 2,424
19년 전 조회 2,828
19년 전 조회 2,324
19년 전 조회 3,690
19년 전 조회 4,723
19년 전 조회 3,754
19년 전 조회 1,715
19년 전 조회 2,725
19년 전 조회 2,368
19년 전 조회 2,604
19년 전 조회 4,389
19년 전 조회 2,562
19년 전 조회 3,015
19년 전 조회 2,974
19년 전 조회 3,646
19년 전 조회 3,603
19년 전 조회 1,824
19년 전 조회 2,193
19년 전 조회 2,758
19년 전 조회 2,421
19년 전 조회 4,289
19년 전 조회 3,281
19년 전 조회 4,063
19년 전 조회 2,580
19년 전 조회 2,462
19년 전 조회 2,931
19년 전 조회 2,460
19년 전 조회 2,757
19년 전 조회 2,444
19년 전 조회 3,154
19년 전 조회 1,671
19년 전 조회 2,969
19년 전 조회 2,235
19년 전 조회 2,162
19년 전 조회 2,257
19년 전 조회 2,611
19년 전 조회 2,094
19년 전 조회 4,443
19년 전 조회 2,656
19년 전 조회 2,434
19년 전 조회 2,939
20년 전 조회 3,033
20년 전 조회 3,090
20년 전 조회 2,619
20년 전 조회 2,997
20년 전 조회 2,523
20년 전 조회 2,184
20년 전 조회 2,767
20년 전 조회 2,454
20년 전 조회 2,527
20년 전 조회 3,781
20년 전 조회 3,254
20년 전 조회 4,972
20년 전 조회 2,396
20년 전 조회 4,488
20년 전 조회 3,087
20년 전 조회 2,864
20년 전 조회 3,710
20년 전 조회 2,626
20년 전 조회 3,706
20년 전 조회 3,980
20년 전 조회 3,408
🐛 버그신고