Okienko warstwy w JavaScript bla, cla,
nbsp, isn4, hotdog=isie, width=quot100quot, return, lttrgt
nbsp, isie||isnn, else, ,
, bla, if, cla,
nbsp, isn4, hotdog=isie, width=quot100quot, return, lttrgt
nbsp, isie||isnn, else,
function, lttdgt
nbsp, blaltbrgt
bla,
function, bla
bla, lttd, warstwy, javascript, okienko, w, eventsrcelement, eventclientx, while, hotdogparentelement, topdog=isie, offsetx=isie, code, floating, offsety=isie, eventclienty, end, content, layer, whichdog=isie, width=quot100quotgt
nbsp, whichdogstyletop=isie, ddenabled, nowx+eventclientxoffsetx, nowx+eclientxoffsetx, documentallthelayer, cellspacing=quot0quot, whichdogstyleleft=isie, border=quot0quot,
bla, nowy+eventclientyoffsety, return
, return
nbsp, documentonmousemove=dd
, ddenabled=true
, ddinite
, dde
,
isie=documentall
isnn=documentalldocumentgetelementbyid
isn4=documentlayers
ishot=false
function, hotdogparentnode
, hotdogid==titlebar
, documentthelayervisibility=show
documentonmousedown=ddinit
documentonmouseup=functionddenabled=false
, body, nowy+eclientyoffsety
nbsp, whichdogstylevisibility=visible
, eclienty
, nowx=parseintwhichdogstyleleft
, eclientx
, nowy=parseintwhichdogstyletop
, n4onmouseup=function
, whichdogstylevisibility=hidden
, documentthelayervisibility=hide
function, showme
, n4movebyexn4xeyn4y
, ishot
, falsenbsp, n4captureeventseventmousedown|eventmouseup
, hideme
, n4releaseeventseventmousemove
, etarget, hotdogid=titlebarhotdogtagname=topdog
, documentgetelementbyidthelayer, nowy+eclientyoffsety
, false
, false, html
, hotdogparentnode
nbsp, okienka
, ddinite
nbsp, quotbodyquot, nazwa, x
, language=quotjavascript12quotgt
isie=documentall
isnn=documentallampampdocumentgetelementbyid
isn4=documentlayers
ishot=false
function, bla
, n4=evalwhatdog
, nbsp, documentgetelementbyidquotthelayerquotnbsp, false
nbspnbspnbsp, quothtmlquot
nbsp, etargetnbsp, hotdogid==quottitlebarquot
nbspnbspnbsp, hotdogid=quottitlebarquotampamphotdogtagname=topdog
nbspnbspnbsp,
show
hide
ltscript,
, n4=evalwhatdog
nbsp, n4captureeventseventmousedown|eventmouseup
nbsp, n4onmousemove=functione
nbspnbspnbsp, ddenabled=true
nbspnbspnbsp, nowx=parseintwhichdogstyleleft
nbspnbspnbsp, dde
nbsp, documentonmousemove=dd
nbsp, ishot
nbspnbspnbspnbspnbsp, n4movebyexn4xeyn4y
nbspnbspnbspnbspnbsp, eclienty
nbspnbspnbsp, eclientx
nbspnbspnbsp, n4captureeventseventmousemove
nbspnbspnbsp, n4onmousedown=functione
nbspnbspnbsp, n4y=ey
nbsp, n4x=ex
nbspnbspnbsp, ddn4whatdog
nbsp, face=arialnbsp, id=quotthelayerquot, showme
nbsp, lta, lttable, whichdogstylevisibility=quotvisiblequot
nbsp, cellpadding=quot5quot, cellpadding=quot0quot, your, here, bgcolor=quotffffffquot, style=quotpadding4pxquot, style=quottextdecorationnonequotgtxltfontgtltagt
nbsp, colspan=quot2quotgt
lt, gtnbsp, place, documentthelayervisibility=quotshowquot
documentonmousedown=ddinit
documentonmouseup=functionquotddenabled=falsequot
ltscriptgt
lt, gt
ltdiv, ltilayer, falsequotgt
nbsp, onselectstart=quotreturn, n4releaseeventseventmousemove
nbsp, height=quot36quotgt
nbsp, documentthelayervisibility=quothidequot
function, whichdogstylevisibility=quothiddenquot
nbsp, hideme
nbsp, style=quotcursormovequot, begin, style=quotpositionabsolutewidth250pxleft100top100visibilityvisiblequotgt
lttable, bgcolor=quot424242quot, width=quot250quot, id=quottitlebarquot, class=quotzamaquotgt
lttrgt
lttd, bla
lt, of, href=quotquot, n4onmouseup=function
nbspnbspnbsp, style=quotcursorhandquot, color=ffffff, falsequotgtltfont, ltilayergt
nbsp, onclick=quothidemereturn, valign=quottopquotgt
nbsp, ltlayer, n4captureeventseventmousemove
, n4onmousedown=functione
, n4onmousemove=functione
, n4y=ey
, nowy=parseintwhichdogstyletop
nbspnbspnbsp, n4x=ex
, ltlayergt
nbsp, ddn4thelayerquot, lttablegt, area,
lttdgt
lttrgt
lttablegt
ltdivgt
lt, href=quotjavascripthidemequotgthideltagt, gt
lta, href=quotjavascriptshowmequotgtshowltagt
lta, gt
nbsp, size=2, onmouseout=quotishot=falsequotgt
nbsp, onmouseover=quotishot=trueif, ltfont, okienkaltfontgt
nbsp, face=quotarialquot, color=quotffffffquotgtnazwa, ddn4whatdog
,
Czwartek 03 Kwiecień 2025r.
Godz 00:00:00
Postów: 251
Okienko warstwy w JavaScript
Nazwa okienka
|
X
|
bla cla cla bla bla bla
bla cla cla bla bla bla
bla cla cla bla bla bla
bla cla cla bla bla bla
|
|
show
hide
<script language="JavaScript1.2">
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;
function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
hotDog=isIE ? event.srcElement : e.target;
while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
}
if (hotDog.id=="titleBar"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;
}
}
function dd(e){
if (!ddEnabled) return;
whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
return false;
}
function ddN4(whatDog){
if (!isN4) return;
N4=eval(whatDog);
N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
N4.onmousedown=function(e){
N4.captureEvents(Event.MOUSEMOVE);
N4x=e.x;
N4y=e.y;
}
N4.onmousemove=function(e){
if (isHot){
N4.moveBy(e.x-N4x,e.y-N4y);
return false;
}
}
N4.onmouseup=function(){
N4.releaseEvents(Event.MOUSEMOVE);
}
}
function hideMe(){
if (isIE||isNN) whichDog.style.visibility="hidden";
else if (isN4) document.theLayer.visibility="hide";
}
function showMe(){
if (isIE||isNN) whichDog.style.visibility="visible";
else if (isN4) document.theLayer.visibility="show";
}
document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");
</script>
<!-- BEGIN FLOATING LAYER CODE //-->
<div id="theLayer" style="position:absolute;width:250px;left:100;top:100;visibility:visible">
<table border="0" width="250" bgcolor="#424242" cellspacing="0" cellpadding="5" class="zama">
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="36">
<tr>
<td id="titleBar" style="cursor:move" width="100%">
<ilayer width="100%" onSelectStart="return false">
<layer width="100%" onMouseover="isHot=true;if (isN4) ddN4(theLayer)" onMouseout="isHot=false">
<font face="Arial" color="#FFFFFF">Nazwa okienka</font>
</layer>
</ilayer>
</td>
<td style="cursor:hand" valign="top">
<a href="#" onClick="hideMe();return false"><font color=#ffffff size=2 face=arial style="text-decoration:none">X</font></a>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2">
<!-- PLACE YOUR CONTENT HERE //-->
bla cla cla bla bla bla<br>
bla cla cla bla bla bla<br>
bla cla cla bla bla bla<br>
bla cla cla bla bla bla
<!-- END OF CONTENT AREA //-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- END FLOATING LAYER CODE //-->
<a href="javascript:showMe();">show</a>
<a href="javascript:hideMe();">hide</a>
Darmowy hosting zapewnia PRV.PL