如果在网页中调用这段JS代码,就会出现其它JS都不能用的情况,不调用前网页是正常的,请高手帮我看看这段代码错在哪里?
<H1 id=Logo265><A href="http://www.001du.com/"><IMG id=logoimg alt=""
src="http://www.001du.com/static/images/hongse/logo.gif" border=0></A></H1>
<SCRIPT type=text/javascript>
function m(a, b)
{
return a.position = b
}
function o(a, b)
{
return a.left = b
}
function ca(a, b)
{
return a.zIndex = b
}
var p = "length", r = "style", s = "body", x, y;
function U(a)
{
return document.createElement(a)
}
var Y, mb, nb, ob, pb, Z, $;
var qb = 52, rb = 34, sb = 15, tb = 35, ub = 45, vb = 35, wb = 15, xb = 36, yb = 45, zb = 36, Ab = 3, Bb = 42, Cb = 2, Db = 100;
var Eb;
var Fb = "http://www.001du.com/static/images/hongse/logo.gif";
function Gb(a)
{
var b = 0, c = 0;
if (a.pageX || a.pageY)
{
b = a.pageX;
c = a.pageY
}
else if (a.clientX || a.clientY)
{
b = a.clientX + document[s].scrollLeft;
c = a.clientY + document[s].scrollTop
}
return [b, c]
}
function Ib(a)
{
Jb();
a = a || document.parentWindow.event;
var b = Gb(a), c = b[0], d = b[1];
Kb(c, d, Z, sb, tb);
Kb(c, d, $, ub, vb)
}
function Kb(a, b, c, d, g)
{
var e = a - d - mb, f = (b - g - nb) * (Ab / Bb), j = Math.sqrt(Math.pow(e, 2)
+ Math.pow(f, 2)), h, l;
if (j == 0)
{
h = d;
l = g
}
else
{
var B = Math.sqrt(Math.pow(j, 2) + Math.pow(Db, 2)), E = Ab * j / B;
h = E * e / j + d + mb;
l = E * f / j / (Ab / Bb) + g + nb
}
h -= Cb;
l -= Cb;
o(c[r], parseInt(h, 10) + "px");
c[r].top = parseInt(l, 10) + "px"
}
function EYES_init()
{
var a = Mb("Logo265"), b = Nb(a, "a");
Eb = Nb(a, "img");
if ( - 1 == Eb.src.indexOf(Fb))
{
return
}
Y = U("");
Z = U("img");
$ = U("img");
Y.border = (Z.border = ($.border = 0));
Y.src = "";
Z.src = ($.src = "http://www.001du.com/static/images/yz.gif");
Jb();
m(Y[r], m(Z[r], m($[r], "absolute")));
ca(Y[r], 90);
ca(Z[r], ca($[r], 100));
b.appendChild(Y);
b.appendChild(Z);
b.appendChild($);
document.onmousemove = Ib;
T(window, "pageshow", Jb);
T(window, "resize", Jb)
}
function Jb()
{
var a = Ob(Eb);
mb = a.x;
nb = a.y;
ob = Eb.width;
pb = Eb[p];
var b = "px";
o(Y[r], mb + qb + b);
Y[r].top = nb + rb + b;
o(Z[r], a.x + wb + b);
Z[r].top = a.y + xb + b;
o($[r], a.x + yb + b);
$[r].top = a.y + zb + b
}
function Ob(a)
{
var b = a.offsetLeft, c = a.offsetTop;
if (a.offsetParent != null)
{
var d = Ob(a.offsetParent);
b += d.x;
c += d.y;
}
return{x:b,y:c}
}
function T(a, b, c)
{
var d = "on" + b;
if (a.addEventListener)
{
a.addEventListener(b, c, false)
}
else if (a.attachEvent)
{
a.attachEvent(d, c)
}
else
{
var g = a[d];
a[d] = function()
{
var e = g.apply(this, arguments), f = c.apply(this, arguments);
return e == undefined ? f : (f == undefined ? e : f && e)
}
}
};
function Mb(a)
{
return document.getElementById(a)
}
function Nb(a, b)
{
return a.getElementsByTagName(b)[0]
}
EYES_init();
</SCRIPT>
<H1 id=Logo265><A href="http://www.001du.com/"><IMG id=logoimg alt=""
src="http://www.001du.com/static/images/hongse/logo.gif" border=0></A></H1>
<SCRIPT type=text/javascript>
function m(a, b)
{
return a.position = b
}
function o(a, b)
{
return a.left = b
}
function ca(a, b)
{
return a.zIndex = b
}
var p = "length", r = "style", s = "body", x, y;
function U(a)
{
return document.createElement(a)
}
var Y, mb, nb, ob, pb, Z, $;
var qb = 52, rb = 34, sb = 15, tb = 35, ub = 45, vb = 35, wb = 15, xb = 36, yb = 45, zb = 36, Ab = 3, Bb = 42, Cb = 2, Db = 100;
var Eb;
var Fb = "http://www.001du.com/static/images/hongse/logo.gif";
function Gb(a)
{
var b = 0, c = 0;
if (a.pageX || a.pageY)
{
b = a.pageX;
c = a.pageY
}
else if (a.clientX || a.clientY)
{
b = a.clientX + document[s].scrollLeft;
c = a.clientY + document[s].scrollTop
}
return [b, c]
}
function Ib(a)
{
Jb();
a = a || document.parentWindow.event;
var b = Gb(a), c = b[0], d = b[1];
Kb(c, d, Z, sb, tb);
Kb(c, d, $, ub, vb)
}
function Kb(a, b, c, d, g)
{
var e = a - d - mb, f = (b - g - nb) * (Ab / Bb), j = Math.sqrt(Math.pow(e, 2)
+ Math.pow(f, 2)), h, l;
if (j == 0)
{
h = d;
l = g
}
else
{
var B = Math.sqrt(Math.pow(j, 2) + Math.pow(Db, 2)), E = Ab * j / B;
h = E * e / j + d + mb;
l = E * f / j / (Ab / Bb) + g + nb
}
h -= Cb;
l -= Cb;
o(c[r], parseInt(h, 10) + "px");
c[r].top = parseInt(l, 10) + "px"
}
function EYES_init()
{
var a = Mb("Logo265"), b = Nb(a, "a");
Eb = Nb(a, "img");
if ( - 1 == Eb.src.indexOf(Fb))
{
return
}
Y = U("");
Z = U("img");
$ = U("img");
Y.border = (Z.border = ($.border = 0));
Y.src = "";
Z.src = ($.src = "http://www.001du.com/static/images/yz.gif");
Jb();
m(Y[r], m(Z[r], m($[r], "absolute")));
ca(Y[r], 90);
ca(Z[r], ca($[r], 100));
b.appendChild(Y);
b.appendChild(Z);
b.appendChild($);
document.onmousemove = Ib;
T(window, "pageshow", Jb);
T(window, "resize", Jb)
}
function Jb()
{
var a = Ob(Eb);
mb = a.x;
nb = a.y;
ob = Eb.width;
pb = Eb[p];
var b = "px";
o(Y[r], mb + qb + b);
Y[r].top = nb + rb + b;
o(Z[r], a.x + wb + b);
Z[r].top = a.y + xb + b;
o($[r], a.x + yb + b);
$[r].top = a.y + zb + b
}
function Ob(a)
{
var b = a.offsetLeft, c = a.offsetTop;
if (a.offsetParent != null)
{
var d = Ob(a.offsetParent);
b += d.x;
c += d.y;
}
return{x:b,y:c}
}
function T(a, b, c)
{
var d = "on" + b;
if (a.addEventListener)
{
a.addEventListener(b, c, false)
}
else if (a.attachEvent)
{
a.attachEvent(d, c)
}
else
{
var g = a[d];
a[d] = function()
{
var e = g.apply(this, arguments), f = c.apply(this, arguments);
return e == undefined ? f : (f == undefined ? e : f && e)
}
}
};
function Mb(a)
{
return document.getElementById(a)
}
function Nb(a, b)
{
return a.getElementsByTagName(b)[0]
}
EYES_init();
</SCRIPT>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货