H

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

· 19년 전 · 2563 · 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,218
19년 전 조회 3,010
19년 전 조회 2,219
19년 전 조회 3,069
19년 전 조회 3,487
19년 전 조회 5,181
19년 전 조회 3,104
19년 전 조회 3,111
19년 전 조회 2,691
19년 전 조회 2,432
19년 전 조회 2,687
19년 전 조회 2,425
19년 전 조회 2,537
19년 전 조회 2,335
19년 전 조회 2,678
19년 전 조회 2,944
19년 전 조회 3,234
19년 전 조회 7,036
19년 전 조회 5,156
19년 전 조회 2,411
19년 전 조회 5,134
19년 전 조회 3,083
19년 전 조회 2,433
19년 전 조회 2,124
19년 전 조회 3,555
19년 전 조회 2,869
19년 전 조회 3,239
19년 전 조회 2,866
19년 전 조회 3,361
19년 전 조회 2,685
19년 전 조회 3,434
19년 전 조회 2,394
19년 전 조회 4,079
19년 전 조회 3,265
19년 전 조회 4,109
19년 전 조회 3,456
19년 전 조회 3,082
19년 전 조회 3,378
19년 전 조회 2,426
19년 전 조회 2,832
19년 전 조회 2,324
19년 전 조회 3,692
19년 전 조회 4,726
19년 전 조회 3,755
19년 전 조회 1,717
19년 전 조회 2,726
19년 전 조회 2,371
19년 전 조회 2,606
19년 전 조회 4,391
19년 전 조회 2,564
19년 전 조회 3,017
19년 전 조회 2,977
19년 전 조회 3,649
19년 전 조회 3,606
19년 전 조회 1,827
19년 전 조회 2,195
19년 전 조회 2,761
19년 전 조회 2,423
19년 전 조회 4,292
19년 전 조회 3,283
19년 전 조회 4,064
19년 전 조회 2,582
19년 전 조회 2,464
19년 전 조회 2,933
19년 전 조회 2,460
19년 전 조회 2,761
19년 전 조회 2,446
19년 전 조회 3,157
19년 전 조회 1,673
19년 전 조회 2,972
19년 전 조회 2,239
19년 전 조회 2,165
19년 전 조회 2,259
19년 전 조회 2,614
19년 전 조회 2,097
19년 전 조회 4,444
20년 전 조회 2,658
20년 전 조회 2,436
20년 전 조회 2,942
20년 전 조회 3,036
20년 전 조회 3,093
20년 전 조회 2,620
20년 전 조회 2,999
20년 전 조회 2,525
20년 전 조회 2,187
20년 전 조회 2,768
20년 전 조회 2,457
20년 전 조회 2,527
20년 전 조회 3,783
20년 전 조회 3,257
20년 전 조회 4,976
20년 전 조회 2,397
20년 전 조회 4,490
20년 전 조회 3,089
20년 전 조회 2,867
20년 전 조회 3,712
20년 전 조회 2,629
20년 전 조회 3,709
20년 전 조회 3,982
20년 전 조회 3,409
🐛 버그신고