Español
<html> <head> <title>_xWin</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <META NAME="Descripción" CONTENT="http:/ /www.youthfly.net"> <tipo de estilo='text/css'> <!-- body{font-size:12px;} a:visited{text-decoration:none;color:slategray;} a:hover{ text-decoration:underline;color:slategray;} a:link{text-decoration:none;color:slategray;} --> </style> <script language=JScript> <!-- //Se puede empaquetar como un js archivo; var x0=0,y0=0,x1=0,y1=0; var offx=6,offy=6; var hover='orange',normal='#336699';// color; var index=10000;//z-index; //Comenzar a arrastrar; function startDrag(obj) { if(event.button==1) { //Bloquear la barra de título; el objeto; var win = obj.parentNode; var sha = win.nextSibling; //Registra la posición del mouse y la capa; parseInt(win .style.top); //Color de registro normal = obj.style.backgroundColor; //Cambiar estilo; obj.style.backgroundColor = hover; = desplazarse; sha.style.left = x1 + offx; sha.style.top = y1 + offy; movible = true; ; var sha = win.nextSibling; win.style.left = x1 + event.clientX - x0; win.style.top = y1 + event.clientY - y0; + offx; sha.style.top = parseInt(win.style.top) + offy; } } //Dejar de arrastrar; function stopDrag(obj) { if(moveable) { var win = obj.parentNode; nextSibling; var msg = obj.nextSibling; win.style.borderColor = normal; obj.parentNode.style.left; top = obj.parentNode.style.top; obj.releaseCapture(); moveable = } } //Obtener foco; 2; var idx = index; obj.style.zIndex=idx; obj.nextSibling.style.zIndex=idx-1; } } //Minimizar; función min(obj) { var win = obj.parentNode.parentNode; = win.nextSibling; var tit = obj.parentNode; var msg = tit.nextSibling; var flg = msg.style.display=="none"; win.style.height = parseInt(msg.style. altura) + parseInt(tit.style.height) + 2*2; sha.style.height = win.style.height; msg.style.display = "bloque"; .style.height = parseInt(tit.style.height) + 2*2; sha.style.height = win.style.height; obj.innerHTML = "2"; //Crea un objeto; función xWin(id,w,h,l,t,tit,msg) { index = index+2; this.idth = this.height = h; izquierda = l; this.top = t; this.zIndex = index; this.title = tit; this.message = msg; this.bulid = bulid(); ; función bulid() { var str = "" + "<div id=xMsg" + this.id + " " + "style='" + "z-index:" + this.zIndex + ";" :" + este.ancho + ";" + "alto:" + este.alto + ";" + "izquierda:" + esto.izquierda + ";" + "arriba:" + este.arriba + ";" + "color de fondo:" + normal + ";" + "color:" + normal + ";" + "tamaño de fuente:8pt;" + "familia de fuente: Tahoma;" + "posición: absoluta;" cursor:predeterminado;" + "borde:2px sólido " + normal + ";" + "' " + "onmousedown='getFocus(this)'>" + "<div " + "estilo='" + "color de fondo :" + normal + ";" + "ancho:" + (this.width-2*2) + ";" + "alto:20;" + "color:blanco;" + "' " + "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=' ancho:12;ancho de borde:0px;color:blanco;font-family:webdings;' onclick='min(this)'>0</span>" + "<span style='width:12;ancho de borde :0px;color:blanco;font-family:webdings;' onclick='ShowHide(""+this.id+"",null)'>r</span>" + "</div>" + "< estilo div ='" + "ancho: 100%;" + "alto:" + (this.height-20-4) + ";" + "color de fondo: blanco;" + "alto de línea: 14px;" + "palabra-break:break-all;" + "padding:3px;" + "'>" + this.message + "</div>" + "</div>" + "<div id=xMsg" + this.id + "bg style='" + "ancho:" + this.width + ";" + "alto:" + this.height + ";" + "top:" + this.top + ";" "izquierda:" + this.left + ";" + "z-index:" + (this.zIndex-1) + ";" + "posición:absoluta;" + "color de fondo: negro;" :alpha(opacity=40);" + "'></div>"; document.body.insertAdjacentHTML("beforeEnd",str); } //Mostrar función de ventana oculta 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 language='JScript'> <!-- función inicializar() { var a = new xWin("1",160,200,200,200,"Ventana 1","xWin <br> Una ventana Pop Div genial<br>Versión:1.0<br>2002-8-13"); ("2",240,200,100,100,"Ventana 2","Bienvenido a visitar mi sitio web personal:<br><a href=http://www.youthfly.net target=_blank>http://www.youthfly.net< /a><br>anducanalsosignmyguestbookat:<br><ahref=http://www ... Youthfly.net</a><br><br>¡¡¡Gracias!!!=)..."); var c = new xWin("3",200,160,250,50,"Window 3","Copyright de <a href='mailto:webmaster#youthfly.net'>Wildwind</a>!"); ");//Ocultar ventana 1 } window.onload = inicializar; //--> </script> </head> <base target="_blank"> <body onselectstart='return false' oncontextmenu='return false' > <a onclick="ShowHide('1',null);return false;" href="">Ventana 1</a> <a onclick="ShowHide('2',null);return false;" "">Ventana 2</a> <a onclick="ShowHide('3',null);return false;" href="">Ventana 3</a> </body> </html>