Some very practical and must-use small script codes: Script 1: Automatically play sounds after entering the homepage Script 2: Automatically maximize words after entering the homepage, saving you the trouble of clicking by yourself <br>self.moveTo( 0,0) <br>self.resizeTo(screen.availWidth,screen.availHeight) <br> Script 3: Script to display the current time <br><br>Script 4: Script to display the last modified time <br><script>document.write(document.lastModified) Script 5: Set as homepage, add as favorites, join channel, start outlook to send emails onclick="this.style.behavior="url(#default#homepage )"; this.setHomePage("yourURL">Set as homepage onclick="window.external.AddFavorite (location.href,document.title);">Add to favorites Add channel< ;/a> Contact me Script 6: Status bar dynamically displays the current time <br>function see(){ <br>window.setTimeout("see()",1000); <br>today = new Date(); <br>self.status = today.toString(); <br> } <br> Script 7: Script to close the window [Close window] Script 8: Press the F12 key to return directly to the homepage function look(){ <br>if(event.keyCode==123) {document.location.href=http://10.13.31.90/~kayvin/} <br>} <br>if(document.onkeydown==null) <br>{document.onkeydown=look} <br>< /script> <br><br>Script 9: Back, Refresh, Forward<br></p> <div class="codetitle"> <span><a style="CURSOR: pointer" data="30953" class="copybut" id="copybut30953" onclick="doCopy('code30953')"><u>Copy code</u></a></span> The code is as follows:</div> <div class="codebody" id="code30953"> <br><input type=button value=Back onclick=history.go(-1)> <br><input type=button value=Refresh onclick=history.go(-0)> <br><input type=button value=forward onclick=history.go(1)> <br> </div> <br>Script 10: Set time pop-up window, 4000=4 seconds, of course you can customize it<br><div class="codetitle"> <span><a style="CURSOR: pointer" data="8926" class="copybut" id="copybut8926" onclick="doCopy('code8926')"><u>Copy code</u></a></span> The code is as follows:</div> <div class="codebody" id="code8926"> <br><script>function l() { <br>window. open("yourURL","name","width=500,height=150,border=0") <br>} <br>setTimeout("l()",4000) <br> 2 The prompt information next to the mouse is similar to the page prompt effect after 163 login tip [Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute ] //***********默认设置定义.********************* tPopWait=50;//停留tWait豪秒后显示提示。 tPopShow=5000;//显示tShow豪秒后关闭提示 showPopStep=20; popOpacity=99; //***************内部变量定义***************** sPop=null; curShow=null; tFadeOut=null; tFadeIn=null; tFadeWaiting=null; document.write("<style type='text/css'id='defaultPopStyle'>"); document.write(".cPopText { background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}"); document.write(""); document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'>"); function showPopupText(){ var o=event.srcElement; MouseX=event.x; MouseY=event.y; if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""}; if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""}; if(o.dypop!=sPop) { sPop=o.dypop; clearTimeout(curShow); clearTimeout(tFadeOut); clearTimeout(tFadeIn); clearTimeout(tFadeWaiting); if(sPop==null || sPop=="") { dypopLayer.innerHTML=""; dypopLayer.style.filter="Alpha()"; dypopLayer.filters.Alpha.opacity=0; } else { if(o.dyclass!=null) popStyle=o.dyclass else popStyle="cPopText"; curShow=setTimeout("showIt()",tPopWait); } } } function showIt(){ dypopLayer.className=popStyle; dypopLayer.innerHTML=sPop; popWidth=dypopLayer.clientWidth; popHeight=dypopLayer.clientHeight; if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24 else popLeftAdjust=0; if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24 else popTopAdjust=0; dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust; dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust; dypopLayer.style.filter="Alpha(Opacity=0)"; fadeOut(); } function fadeOut(){ if(dypopLayer.filters.Alpha.opacity<popOpacity) { dypopLayer.filters.Alpha.opacity+=showPopStep; tFadeOut=setTimeout("fadeOut()",1); } else { dypopLayer.filters.Alpha.opacity=popOpacity; tFadeWaiting=setTimeout("fadeIn()",tPopShow); } } function fadeIn(){ if(dypopLayer.filters.Alpha.opacity>0) { dypopLayer.filters.Alpha.opacity-=1; tFadeIn=setTimeout("fadeIn()",1); } } document.onmouseover=showPopupText;