这句什么意思? <BODY ID="bodyid" 给BODY命名一个IDonload="LoadDone()" 页面加载后执行LoadDone()onresize ="End();LoadDone();" 页面大小发生变化,比如最大化,拖动改变大小等时候执行End();LoadDone();onunload="End()"> 页面转向、刷新或者关闭的时候执行End() 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 要看你的函数如何实现的..这几句看不出名堂来..大体上只是把onresize当做一次reload事件处理 <HEAD><SCRIPT>var timid = -1;var timoID_2 = -1;var nLine;var nPosInLine;var oRcts;var nDivLen;var nEraser;function LoadDone() { oTextRange = document.body.createTextRange(); // Get bounding rect of the range oRcts = oTextRange.getClientRects(); nLine = 0; oBndRct = obj.getBoundingClientRect(); nDivLen = oBndRct.right - oBndRct.left + 1; MoveTo();}function MoveTo() { if (nLine >= oRcts.length) { nLine = 0; } obj.style.top = oRcts[nLine].top; nPosInLine = oRcts[nLine].left; nEraser = 0; timoID_2 = setInterval("MoveToInLine()",60); }function MoveToInLine() { if (nPosInLine >= oRcts[nLine].right - nDivLen) { clearInterval(timoID_2); timoID_2 = -1; obj.style.left = oRcts[nLine].right - nDivLen; nLine++; timid = setTimeout("MoveTo()", 100); return; } if (nEraser == 0) { nEraser = 1; } else { nEraser = 0; } im.src = "http://www.csdn.net/images/csdn.gif"; obj.style.left = nPosInLine; nPosInLine += 3;}function End() { if(timid != -1) { clearInterval(timid); timid = -1; } if(timoID_2 != -1) { clearInterval(timoID_2); timoID_2 = -1; }}</SCRIPT></HEAD><BODY ID="bodyid" onload="LoadDone()" onresize ="End();LoadDone();" onunload="End()"><P STYLE="text-align:center"><B>The quick brown fox jumps over the lazy dog.</B></P><DIV ID="obj" STYLE="position:absolute"><IMG ID="im" SRC="http://www.csdn.net/images/csdn.gif" BORDER=0 HEIGHT=80 WIDTH=100></DIV></BODY> js window.open() 急 在线等~ ajax结果赋值 为什么我的浏览器取screen.width不正确 jQuery实现的效果问题 widget开发中,浏览器如何解析icon 麻烦大家来帮帮忙,关于js的! 报错:document.images.s_l 为空或不是对象 不能获取id的值?? js的跨frame的调用,急用,马上结 用javascript怎样控制字符串的长度? 一个简单的问题! 谁能解密这段JS代码???
这几句看不出名堂来..
大体上只是把onresize当做一次reload事件处理
<SCRIPT>
var timid = -1;
var timoID_2 = -1;
var nLine;
var nPosInLine;
var oRcts;
var nDivLen;
var nEraser;function LoadDone() {
oTextRange = document.body.createTextRange();
// Get bounding rect of the range
oRcts = oTextRange.getClientRects();
nLine = 0;
oBndRct = obj.getBoundingClientRect();
nDivLen = oBndRct.right - oBndRct.left + 1;
MoveTo();
}function MoveTo() {
if (nLine >= oRcts.length) {
nLine = 0;
}
obj.style.top = oRcts[nLine].top;
nPosInLine = oRcts[nLine].left;
nEraser = 0;
timoID_2 = setInterval("MoveToInLine()",60);
}function MoveToInLine() {
if (nPosInLine >= oRcts[nLine].right - nDivLen) {
clearInterval(timoID_2);
timoID_2 = -1;
obj.style.left = oRcts[nLine].right - nDivLen;
nLine++;
timid = setTimeout("MoveTo()", 100);
return;
}
if (nEraser == 0) {
nEraser = 1;
}
else {
nEraser = 0;
}
im.src = "http://www.csdn.net/images/csdn.gif";
obj.style.left = nPosInLine;
nPosInLine += 3;
}function End() {
if(timid != -1) {
clearInterval(timid);
timid = -1;
}
if(timoID_2 != -1) {
clearInterval(timoID_2);
timoID_2 = -1;
}
}
</SCRIPT>
</HEAD><BODY ID="bodyid" onload="LoadDone()" onresize ="End();LoadDone();" onunload="End()"><P STYLE="text-align:center">
<B>The quick brown fox jumps over the lazy dog.</B>
</P><DIV ID="obj" STYLE="position:absolute">
<IMG ID="im" SRC="http://www.csdn.net/images/csdn.gif"
BORDER=0 HEIGHT=80 WIDTH=100>
</DIV></BODY>