关于DIV拖动时鼠标形状
DIV设置了鼠标形状为Move, 当DIV没有设置背景图片时,拖动DIV时鼠标正常,
但设置背景图片后,拖动DIV时鼠标不是Move形状了。知道为什么吗?
代码如下:
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script id="clientEventHandlersJS" language="javascript">
<!--
var isdown = false;
var beginx,beginy,endx,endy;
function down()
{
isdown = true;
beginx = event.clientX;
beginy = event.clientY;
}
function move()
{
if (isdown)
{
endx = event.clientX;
endy = event.clientY;
div1.style.left = endx-beginx;
div1.style.top = endy-beginy;
}
}
function up()
{
isdown = false;
}
//-->
</script>
</head>
<body ms_positioning="GridLayout">
<div id="div1" style="LEFT: 0px; WIDTH: 356px; CURSOR: move; POSITION: absolute; TOP: 0px; HEIGHT: 284px; BACKGROUND-COLOR: silver;BACKGROUND-IMAGE: url(file:///E:\My Documents\My Pictures\样品.jpg)"
language="javascript" onmousedown="down()" onmousemove="move()" onmouseup="up()"></div>
</body>
</html>