落伍者站长论坛's Archiver

jadeyi 发表于 2008-5-11 09:11

请教落伍高手,这两段代码分别是什么用的?

第一段:[code]<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>[/code]第二段:[code]<SCRIPT language=JavaScript>
var currentpos,timer;
function initializeScroll() { timer=setInterval("scrollwindow()",80);}
function scrollclear(){clearInterval(timer);}
function scrollwindow() {currentpos=document.body.scrollTop;window.scroll(0,++currentpos);if (currentpos != document.body.scrollTop) sc();}
document.onmousedown=scrollclear
document.ondblclick=initializeScroll
</SCRIPT>
<SCRIPT language=javascript>
function ContentSize(size)
{
        var obj=document.all.BodyLabel;
        obj.style.fontSize=size+"px";
}
</SCRIPT>[/code]

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.