 |
|
|  |
ÀÚ¹Ù½ºÅ©¸³Æ®·Î À©µµ¿ì Èä³»³»±â |
|
|
 ȨÆäÀÌÁö |
21³â Àü |
¿¹Á¦(Link 1)¸¦ Ŭ¸¯Çغ¸¼¼¿ä
<html>
<title>Windows In JavaScript (Test Ver.)</title>
<head>
<style>
div {position:absolute; font-size:8px; font-family:Tahoma; z-index:2; text-align:center;}
button {font-size:14px; font-family:Tahoma; background:gray; border:0 solid #333333; color:white; font-weight:normal; width:22;}
</style>
<script>
D_curX = D_curY = 0;
D_now = null;
D_prev = null;
D_1stmv = 1;
lrs = null;
dtm = null;
stm = null;
document.onmouseup = FinishDrag;
function FinishDrag() {
if(document.onmousemove == OnDragMove) {
if(D_now.style.pixelLeft < 0) D_now.style.pixelLeft = 1;
if(D_now.style.pixelTop < 0) D_now.style.pixelTop = 1;
/*
l = document.body.clientWidth - D_now.style.pixelWidth;
l = document.body.clientHeight-D_now.style.pixelHeight;
*/
}
if(document.onmousemove == OnResizeMove) lrs.Finish();
document.onmousemove = null;
D_now = null;
}
function BeginDragging(lyr) {
D_now = lyr;
D_1stmv = 1;
document.onmousemove = OnDragMove;
}
function OnDragMove() {
if(D_now == null) return true;
if(D_1stmv) {
D_curX = event.clientX;
D_curY = event.clientY;
D_1stmv = 0;
if(D_prev != D_now) D_now.style.zIndex = D_now.style.zIndex + 1;
D_prev = D_now;
return false;
}
D_now.style.pixelLeft += (event.clientX - D_curX);
D_now.style.pixelTop += (event.clientY - D_curY);
D_curX = event.clientX;
D_curY = event.clientY;
event.returnValue = false;
}
function diOnMouseDown(i) {
if(event.button == 1) BeginDragging(i);
event.returnValue = false;
}
function OnResizeMove() {
if(D_1stmv) {
D_curX = event.clientX;
D_curY = event.clientY;
D_1stmv = 0;
return false;
}
lrs.AddSize(event.clientX - D_curX, event.clientY - D_curY);
D_curX = event.clientX;
D_curY = event.clientY;
event.returnValue = false;
}
function resize1(_child, _ream, _tream, _wmax, _hmax) {
var tream, wlream, hlream, wmax, hmax;
tream = _ream + 1;
wlream = _ream + 1;
hlream = _ream - 4;
wmax = _wmax - wlream;
hmax = _hmax - hlream;
cele = eval("document.all."+_child+".style");
cele1 = parseInt(cele.width);
cele2 = parseInt(cele.height);
hidele = eval("document.all."+_child+"c.style");
hidele.display = 'block';
if(cele1 < _wmax) {
cele.width = cele1 + _ream;
play1 = setInterval("resize1('"+_child+"',"+_ream+","+_tream+","+_wmax+","+_hmax+")" , 0);
} else if(cele2 < _hmax) {
cele.height = cele2 + _ream;
play1 = setInterval("resize1('"+_child+"',"+_ream+","+_tream+","+_wmax+","+_hmax+")" , 0);
} else if(cele1 >= wmax && cele2 >= hmax) {
clearInterval();
} else {
cele.width = cele1;
cele.height = cele2;
clearInterval(play1);
}
}
function resize2(_child, _ream, _tream, _wmin, _hmin) {
var tream;
tream = _ream + 1;
cele = eval("document.all."+_child+".style");
cele1 = parseInt(cele.width);
cele2 = parseInt(cele.height);
hidele = eval("document.all."+_child+"c.style");
if(cele2 > _hmin) {
cele.height = cele2 - _ream;
play2 = setInterval("resize2('"+_child+"',"+_ream+","+_tream+","+_wmin+","+_hmin+")" , 0);
} else if(cele1 > _wmin) {
cele.width = cele1 - _ream;
play2 = setInterval("resize2('"+_child+"',"+_ream+","+_tream+","+_wmin+","+_hmin+")" , 0);
} else if(cele1 <= _wmin && cele2 <= _hmin) {
clearInterval();
hidele.display = 'none';
} else {
cele.width = cele1;
cele.height = cele2;
clearInterval(play2);
}
}
function DoExit(_obj, _order) {
dele = eval("document.all."+_obj+".style");
if(_order == 0) {
dele.display = 'block';
} else {
dele.display = 'none';
}
}
</script>
</head>
<body bgcolor="white">
<div id="parent1" style="left:230; top:150; text-align:right; display:none; z-index:99;" oncontextmenu="return false;">
<table id="child1" onmousedown="diOnMouseDown(parent1)" cellspacing="0" cellpadding="0" border="0" style="border:1 solid black; width:250px; height:19px; left:0; top:0; background:#999999; cursor:move;">
<tr height="21">
<td style="font size:11px Tahamo;" valign="middle">
<b>Title</b>
</td>
<td align="right" valign="top">
<button onclick="resize2('child1', 4, 2, 250, 22);" style="height:21; vertical-align:top;">£ß</button>
<button onclick="resize1('child1', 4, 2, 500, 200);" style="height:21; vertical-align:top;">¢Ã</button>
<button onclick="DoExit('parent1', 1);" style="height:21; vertical-align:top;">X</button>
</td>
</tr>
<tr height="1" bgcolor="black">
<td colspan="2">
</td>
</tr>
<tr id="child1c" style="display:none; background:white;" valign="top">
<td colspan="2" style="font size:11px Tahamo;">
<table cellspacing="1" cellpadding="1" border="0" align="left">
<tr>
<td style="font size:12px ±¼¸²; color:black;">
ÈÄÈÊ...-_-;;;;
<br>
Å×½ºÆ®ÀÔ´Ï´Ù-_-;
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="link1" style="left:500; top:230;" onmousedown="diOnMouseDown(link1)" oncontextmenu="return false;">
<a title="dajujiWindows Open (Double Click!)" href="javascript:;" ondblclick="DoExit('parent1', 0);" onfocus="this.blur();" style="text-align:center; width:52; font size:11px Tahoma; border:1 solid black; text-decoration:none;"><font style="font size:30px;"><b>W</b></font><br><b>DajujiWin</b></a>
</div>
</body>
</html>
|
|
̵̧ : 337 |
̵̧
¸ñ·Ï
|
|
|  |
|