鼠标感应智能改变方向的指针,很别致。
<html>
<head>
<meta name="keywords" content="站长,网页特效,js特效,广告代码,sky,www.codesocang.com,站长特效 网" />
<meta name="description" content="www.codesocang.com,源码搜藏网,站长必备js特效及广告代码。大量高质量js特效,提供高质量广告代码下载,尽在源码搜藏网" />
<title>光标方向智能改变,sky整理收集,codesocang.com欢迎您。</title>
</head><body>
<a href="<#ZC_BLOG_HOST#>">源码搜藏网</a>,站长必备的高质量网页特效和广告代码。zzjs.net,站长js特效。<hr>
<!--欢迎来到源码搜藏网,我们网站收集大量高质量js特效,提供许多广告代码下载,网址:www.codesocang.com,zzjs@msn.com,用.net打造靓站-->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var x, y, xold, yold, xdiff, ydiff;
var dir = Array();
dir[0] = "n-resize";
dir[1] = "ne-resize";
dir[2] = "e-resize";
dir[3] = "se-resize";
dir[4] = "s-resize";
dir[5] = "sw-resize";
dir[6] = "w-resize";
dir[7] = "nw-resize";
document.onmousemove = FindXY;
function display(direction)
{
document.body.style.cursor =
dir[direction];
} //欢迎来到源码搜藏网,我们的网址是www.codesocang.com,很好记,源码搜藏,本站收集大量高质量js代码,还有许多广告代码下载。
function FindXY(loc)
{
x = (document.layers) ? loc.pageX :
event.clientX;
y = (document.layers) ? loc.pageY :
event.clientY;
xdiff = x - xold;
ydiff = y - yold
if ((xdiff < 2) && (ydiff < -2))
display(0);
if ((xdiff < 2) && (ydiff > 2))
display(4);
if ((xdiff > 2) && (ydiff < 2))
display(2);
if ((xdiff < -2) && (ydiff < 2))
display(6);
if ((xdiff > 2) && (ydiff > 2))
display(3);
if ((xdiff > 2) && (ydiff < -2))
display(1);
if ((xdiff < -2) && (ydiff > 2))
display(5);
if ((xdiff < -2) && (ydiff < -2))
display(7);
xold = x;
yold = y;
} //欢迎来到源码搜藏网,我们的网址是www.codesocang.com,很好记,源码搜藏,本站收集大量高质量js代码,还有许多广告代码下载。
// End -->
</script>
</body>
</html>
相关内容推荐
热门源码