한국어
<html> <head> <title>_xWin</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <META NAME="Description" CONTENT="http:/ /www.youthfly.net"> <style type='text/css'> <!-- body{font-size:12px;} a:visited{text-꾸밈:none;color:slategray;} a:hover{ text-장식:underline;color:slategray;} a:link{text-꾸밈:none;color:slategray;} --> </style> <script 언어=JScript> <!-- // var x0=0,y0=0,x1=0,y1=0; var offx=6,offy=6; var hover='#336699';// color; var index=10000;//z-index; //드래그 시작; function startDrag(obj) { if(event.button==1) { //obj.setCapture(); 객체; var win = obj.parentNode; var sha = win.nextSibling; //마우스 및 레이어 위치 기록 x0 = event.clientY; parsInt(win .style.top); //색상 기록; obj.style.groundColor = obj.style.borderColor = hover; = hover; sha.style.left = x1 + offx; y1 + offy; moveable = true; } } //드래그; function drag(obj) { var win = obj.parentNode ; var sha = win.nextSibling; win.style.left = x1 + event.clientX - x0; win.style.top = y1 + event.clientY - y0; + offx ; parsInt(win.style.top) + offy; } } //끌기 중지; function stopDrag(obj) { if(moveable) { var win = obj.parentNode; nextSibling ; var msg = obj.borderColor = 일반; obj.style.color = 일반; . top = obj.parentNode.style.top; obj.releaseCapture(); moveable = false; } } //포커스 가져오기; function getFocus(obj) { if(obj.style.zIndex!=index) { index = index + 2 ; var idx = index; obj.nextSibling.style.zIndex=idx-1; } } //최소화; obj.parentNode.parentNode; = win.nextSibling; var tit = obj.parentNode; var msg = tit.nextSibling; var flg = msg.style.display=="none"; if(flg) { win.style.height = parsInt(msg.style. height) + parsInt(tit.style.height) + 2*2; sha.style.height = win.style.display = "block"; obj.innerHTML = "0" } .style.height =parseInt(tit.style.height) + 2*2; sha.style.height = obj.innerHTML = "2"; msg.style.display = "없음" //객체 생성; function xWin(id,w,h,l,t,tit,msg) { index = index+2; this.width = w; left = l; this.zIndex = index; this.message = msg; this.bulid = bulid(); ; 함수 bulid() { var str = "" + "<div id=xMsg" + this.id + " " + "style='" + "z-index:" + this.zIndex + ";" :" + this.width + ";" + "높이:" + this.height + ";" + "왼쪽:" + this.left + ";" + "상단:" + this.top + ";" + "배경색:" + 일반 + ";" + "글꼴 크기:8pt;" + "위치:절대값;" 커서:기본값;" + "테두리:2px 솔리드 " + 일반 + ";" + "' " + "onmousedown='getFocus(this)'>" + "<div " + "style='" + "배경색 :" + 일반 + ";" + "너비:" + (this.width-2*2) + ";" + "높이:20;" + "색상:흰색;" + "' " + "onmousedown=' startDrag(this)' " + "onmouseup='stopDrag(this)' " + "onmousemove='drag(this)' " + "ondblclick='min(this.childNodes[1])'" + ">" + " <span style='width:" + (this.width-2*12-4) + ";padding-left:3px;'>" + this.title + "</span>" + "<span style=' width:12;border-width:0px;color:white;font-family:webdings;' onclick='min(this)'>0</span>" + "<span style='width:12;border-width :0px;color:white;font-family:webdings;' onclick='ShowHide(""+this.id+"",null)'>r</span>" + "</div>" + "< div 스타일='" + "너비:100%;" + "높이:" + (this.height-20-4) + ";" + "배경색:흰색;" + "라인 높이:14px;" + "word-break:break-all;" + "padding:3px;" + "'>" + this.message + "</div>" + "</div>" + "<div id=xMsg" + this.id + "bg style='" + "너비:" + this.width + ";" + "높이:" + this.height + ";" + "top:" + this.top + ";" "왼쪽:" + this.left + ";" + "z-색인:" + (this.zIndex-1) + ";" + "배경색:검정색;" :alpha(opacity=40);" + "'></div>"; document.body.insertAdjacentHTML("beforeEnd",str); } //숨겨진 창 표시 함수 ShowHide(id,dis){ var bdisplay = ( dis==null)?((document.getElementById("xMsg"+id).style.display=="")?"none":""):dis document.getElementById("xMsg"+id).style. display = bdisplay; document.getElementById("xMsg"+id+"bg").style.display = bdisplay; } //--> </script> <script 언어='JScript'> <!-- 함수 초기화() { var a = new xWin("1",160,200,200,200,"Window 1","xWin <br> 멋진 팝 Div 창<br>버전:1.0<br>2002-8-13") var b = new xWin ("2",240,200,100,100,"Window 2","내 개인 웹사이트에 오신 것을 환영합니다:<br><a href=http://www.youthfly.net target=_blank>http://www.youthfly.net< /a><br>anducan alsosignmyguestbookat:<br><ahref=http://www ... youthfly.net</a><br><br>thx!!!=)..."); var c = new xWin("3",200,160,250,50,"창 3","<a href='mailto:webmaster#youthfly.net'>Wildwind</a>의 저작권!"); ShowHide("1","none ");//창 1 숨기기 } window.onload = 초기화; //--> </script> </head> <base target="_blank"> <body onselectstart='return false' oncontextmenu='return false' > <a onclick="ShowHide('1',null);return false;" href="">창 1</a> <a onclick="ShowHide('2',null);return false;" "">창 2</a> <a onclick="ShowHide('3',null);return false;" href="">창 3</a> </body> </html>