急:有关onload的加载问题
<body id="txb" topmargin="15" class="left" onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) >
我想在<body onload=...>时加载showRoles('bnb')和Scroll()两个参数,应该怎么写呢?
参考答案:var autoScrollOn = 1;var scrollOnFunction;var scrollOffFunction;
function scrollit(){if(!parent.d.document.inputform.as.checked){autoScrollOn=0;return true;}else {autoScrollOn=1;StartUp();return true;}}
function scrollWindow( ){if ( autoScrollOn == 1 ){this.scroll(0, 65000);setTimeout('scrollWindow()',200);}}
function scrollOn( ){autoScrollOn = 1;scrollWindow( );}
function scrollOff( ){autoScrollOn = 0;}
function StartUp( ){this.onblur = scrollOnFunction;this.onfocus = scrollOffFunction;scrollWindow( );}
scrollOnFunction = new Function('scrollOn( )')
scrollOffFunction = new Function('scrollOff( )')
StartUp();