페이지내에서 이미지만 윈도우창으로 불러내서 보여주고 왼도우창 이미지 크기에 맞추어 조절하기

· 2009-02-09 (월) 16:23:50 · 2571
<script>
function MlangwindowPop(File) {
//소스제작 Mlang http://www.websil.co.kr-http://www.script.ne.kr - 수정 금지
if(File){
Mlangwindow = window.open("", "Image_Mlang", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=700,height=500,top=0,left=0");
Mlangwindow.document.open();
Mlangwindow.document.write("<html><head><title>『한국무용예술학회』</title>\n");
Mlangwindow.document.write("<SCRIPT LANGUAGE=\"JavaScript\">\n");
Mlangwindow.document.write("var isNav4, isIE4;\n");
Mlangwindow.document.write("if (parseInt(navigator.appVersion.charAt(0)) >= 4) {\n");
Mlangwindow.document.write("isNav4 = (navigator.appName == \"Netscape\") ? 1 : 0;\n");
Mlangwindow.document.write("isIE4 = (navigator.appName.indexOf(\"Microsoft\") != -1) ? 1 : 0;\n");
Mlangwindow.document.write("}\n");
Mlangwindow.document.write("function fitWindowSize() {\n");
Mlangwindow.document.write("if (isNav4) {\n");
Mlangwindow.document.write("window.innerWidth = document.layers[0].document.images[0].width;\n");
Mlangwindow.document.write("window.innerHeight = document.layers[0].document.images[0].height;\n");
Mlangwindow.document.write("}\n");
Mlangwindow.document.write("if (isIE4) {\n");
Mlangwindow.document.write("window.resizeTo(500, 500);\n");
Mlangwindow.document.write("width = 500 - (document.body.clientWidth - document.images[0].width);\n");
Mlangwindow.document.write("height = 500 - (document.body.clientHeight - document.images[0].height);\n");
Mlangwindow.document.write("window.resizeTo(width, height);\n");
Mlangwindow.document.write("}\n");
Mlangwindow.document.write("}\n");
Mlangwindow.document.write("<\/script>\n");
Mlangwindow.document.write("</HEAD>\n");
Mlangwindow.document.write("<BODY onLoad=\"fitWindowSize()\">\n");
Mlangwindow.document.write("<div style=\"position:absolute; left:0px; top:0px\">\n");
Mlangwindow.document.write("<a href=\"javascript:window.self.close();\"><img src=\""+File+"\" border=\"0\"></a>\n");
Mlangwindow.document.write("</div>\n");
Mlangwindow.document.write("</body></html>");
Mlangwindow.document.close();
}else{
alert('등록된 자료가 없습니다.');
}
}
</script>

<a href="javascript:MlangwindowPop('http://www.krsds.com/upload/photo/13.jpg');">테스트</a>

[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
12-08-29 조회 3,861
12-08-07 조회 3,530
12-08-03 조회 3,480
12-07-31 조회 3,595
12-07-30 조회 3,558
12-07-16 조회 3,740
12-07-15 조회 3,447
12-07-07 조회 3,428
12-07-06 조회 3,523
12-07-03 조회 3,609
12-06-29 조회 3,203
12-06-22 조회 3,570
12-06-17 조회 3,659
12-05-21 조회 3,735
12-05-02 조회 3,321
12-05-02 조회 4,127
12-05-02 조회 3,245
12-04-30 조회 3,346
12-04-30 조회 3,062
12-03-17 조회 3,875
12-03-10 조회 3,319
12-03-08 조회 3,717
12-03-03 조회 3,499
12-02-27 조회 4,902
12-02-17 조회 4,232
12-02-16 조회 4,385
12-02-03 조회 3,250
12-01-31 조회 2,969
12-01-24 조회 3,054
12-01-17 조회 3,806
12-01-05 조회 3,363
11-12-30 조회 2,978
11-12-23 조회 4,555
11-12-08 조회 3,285
11-12-07 조회 4,309
11-11-27 조회 3,751
11-11-25 조회 3,994
11-11-23 조회 3,417
11-11-22 조회 3,384
11-11-09 조회 3,167
11-10-23 조회 3,050
11-10-19 조회 3,036
11-10-08 조회 2,738
11-10-04 조회 2,758
11-10-04 조회 5,195
11-09-01 조회 4,257
11-08-13 조회 2,428
11-08-06 조회 3,117
11-07-11 조회 3,485
11-06-27 조회 2,890
11-06-21 조회 2,499
11-06-13 조회 2,329
11-06-07 조회 2,307
11-05-26 조회 2,316
11-04-20 조회 2,661
11-03-21 조회 2,751
11-03-18 조회 2,429
11-03-11 조회 2,461
11-02-07 조회 2,297
11-01-18 조회 2,627
11-01-12 조회 2,305
11-01-06 조회 2,465
10-12-10 조회 2,721
10-12-09 조회 2,364
10-12-08 조회 4,960
10-11-29 조회 2,456
10-11-28 조회 2,699
10-11-28 조회 2,523
10-11-19 조회 2,712
10-11-04 조회 2,656
10-10-21 조회 2,376
10-10-19 조회 3,321
10-10-12 조회 2,645
10-10-07 조회 2,415
10-09-30 조회 3,435
10-09-17 조회 3,828
10-09-17 조회 3,795
10-05-31 조회 3,446
09-12-31 조회 3,593
09-07-23 조회 4,884
08-09-16 조회 3,156
08-09-06 조회 2,879
08-09-04 조회 3,267
08-08-16 조회 4,350
08-08-15 조회 3,230
08-08-14 조회 4,447
08-08-12 조회 3,805
08-07-23 조회 2,738
08-07-10 조회 3,667
08-07-04 조회 2,897
08-06-27 조회 7,550
08-06-19 조회 4,841
08-05-27 조회 5,451
08-05-25 조회 5,281
08-05-23 조회 3,354
08-05-23 조회 4,453
08-05-21 조회 4,835
08-05-20 조회 3,995
08-05-20 조회 3,238
08-04-18 조회 4,224