DreamweaverCS3的AP元素(层)有一个小跳拖不动

来源:百度知道 编辑:UC知道 时间:2024/06/06 04:06:11
图片发不出来,这个问题比较难说,只有看图,但是性质很简单,所以加我说一说答案。
568056477
简要说明:就是AP元素(层),设置好行为“拖动AP元素(层)”后用鼠标放到层的上面一小条,拖不动层,只有除了那一条都可以拖动。

<script type="text/javascript">
var x,y,down=false,obj
function div_onmousedown(){
obj=event.srcElement
down=true
x=event.offsetX
y=event.offsetY
obj.setCapture()
}
function div_onmousemove(){
if(down&&obj==event.srcElement){
obj.style.left=event.x-x
obj.style.top=event.y-y
}
}
function div_onmouseup(){
down=false
obj.releaseCapture()
}
</script>
body里面:
<div style="width:100px;height:100px;position:absolute;left:0px;top:0px;backkground-color:#000000;" onmouse...这是把上面3个事件加上...></div>