通过点击文本框旁边的文字链接或滚动按钮,实现文本框内容上下滚动显示效果,并且带暂停滚动功能。
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <div style="background-color:#FFFFDD;width:155"><center><a href="javascript:movedown()">向下</a> <a href="javascript:moveup()">向上</a> <a href="javascript:stopscroll()">停止</a> <a href="javascript:movetop()">到顶</a></center> </div> <SCRIPT language="JavaScript1.2"> var speed=4 iens6=document.all||document.getElementById ns4=document.layers if (iens6){ document.write('<div id="container" style="position:relative;width:155;height:160px;overflow:hidden;border:2px ridge white">') document.write('<div id="content" style="position:absolute;width:155;left:0;top:0">') }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </script> <ilayer name="nscontainer" width=155 height=160 clip="0,0,155,160"> <layer name="nscontent" width=155 height=160 visibility=hidden> <!--INSERT CONTENT HERE--> <font size="2" face="Arial">-</font><font size="2" face="Arial">武鸣人一号,各种信息免费发布,资源共享合作共赢!</font><br /> <font size="2" face="Arial">-</font><font size="2" face="Arial">武鸣人二号,各种信息免费发布,资源共享合作共赢!</font><br /> <font size="2" face="Arial">-</font><font size="2" face="Arial">武鸣人三号,各种信息免费发布,资源共享合作共赢!</font><br /> <font size="2" face="Arial">-</font><font size="2" face="Arial">武鸣人四号,各种信息免费发布,资源共享合作共赢!</font><br /> <font size="2" face="Arial">-</font><font size="2" face="Arial">武鸣人五号,各种信息免费发布,资源共享合作共赢!</font><br /> <font size="2" face="Arial">-</font><font size="2" face="Arial">武鸣人六号,各种信息免费发布,资源共享合作共赢!</font><br /> <font size="2" face="Arial">-</font><font size="2" face="Arial">武鸣人七号,各种信息免费发布,资源共享合作共赢!</font><br /> <font size="2" face="Arial">-</font><font size="2" face="Arial">武鸣人八号,各种信息免费发布,资源共享合作共赢!</font> </layer> </ilayer> <script language="JavaScript1.2"> if (iens6){ document.write('</div></div>') var crossobj=document.getElementById? document.getElementById("content") : document.all.content var contentheight=crossobj.offsetHeight } else if (ns4){ var crossobj=document.nscontainer.document.nscontent var contentheight=crossobj.clip.height }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function movedown(){ if (window.moveupvar) clearTimeout(moveupvar) if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100)) crossobj.style.top=parseInt(crossobj.style.top)-speed else if (ns4&&crossobj.top>=(contentheight*(-1)+100)) crossobj.top-=speed movedownvar=setTimeout("movedown()",100) }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function moveup(){ if (window.movedownvar) clearTimeout(movedownvar) if (iens6&&parseInt(crossobj.style.top)<=0) crossobj.style.top=parseInt(crossobj.style.top)+speed else if (ns4&&crossobj.top<=0) crossobj.top+=speed moveupvar=setTimeout("moveup()",100) }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function stopscroll(){ if (window.moveupvar) clearTimeout(moveupvar) if (window.movedownvar) clearTimeout(movedownvar) } function movetop(){ stopscroll() if (iens6) crossobj.style.top=0 else if (ns4) crossobj.top=0 } function getcontent_height(){ if (iens6) contentheight=crossobj.offsetHeight else if (ns4) document.nscontainer.document.nscontent.visibility="show" }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) window.onload=getcontent_height </script>
本文来自武鸣人网站,转载请注明出处