Thursday, July 02, 2009

특정 레이어를 마우스로 움직이기...

 

아래 내용도 다음이나 이런데 보면 이미지위에 포스트 잇 구현하는것 기능시 필요.

Ajax이용하면 손쉽게 구현가능할듯...

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>

<script>
<!--

var x =0
var y=0
drag = 0
move = 0
window.document.onfcMouseMove = fcMouseMove
window.document.onfcMouseDown = fcMouseDown
window.document.onfcMouseUp = fcMouseUp
window.document.ondragstart = fcMouseStop
function fcMouseUp() {
move = 0
}
function fcMouseDown() {
if (drag) {
clickleft = window.event.x - parseInt(dragObj.style.left)
clicktop = window.event.y - parseInt(dragObj.style.top)
dragObj.style.zIndex += 1
move = 1
}
}
function fcMouseMove() {
if (move) {
dragObj.style.left = window.event.x - clickleft
dragObj.style.top = window.event.y - clicktop
}
}
function fcMouseStop() {
window.event.returnValue = false
}
function fcShow(divid) {
di

vid.filters.blendTrans.apply(); 
divid.style.visibility = "visible"; 
divid.filters.blendTrans.play(); 
}
function Hide(divid) {
divid.filters.blendTrans.apply();
divid.style.visibility = "hidden";
divid.filters.blendTrans.play(); 

//-->
</script>

<div id="oLayer" style="position:absolute; left:0; top:31; width:200px; height:293px; z-index:5; filter:revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5); border-width:1px; border-style:none;" onmouseover="dragObj=oLayer; drag=1;move=0" onmouseout="drag=0">
<table border="0" cellpadding="2" cellspacing="0" width="200" bgcolor="#1525a7" style="font-family:굴림; font-size:9pt">
    <tr>
        <td style="padding:7">내용</td>
    </tr>
    <tr>
        <td align="right" style="padding:7"><a href="javascript:void(Hide(oLayer))"><font color="white">close</font></a></td>
    </tr>
</table>
</div>
</BODY>
</HTML>

 

No comments: