一串字符在按钮上不停滚动显示,当用户点击按钮时暂停滚动,如果再次点击按钮恢复继续滚动效果,结合自己的需求来修改即可。
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>按扭上字符不停滚动效果_武鸣人</title> </head> <body> <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> <SCRIPT language="javascript"> var scroll = true; var num = 0; function scroll_wwwwumingren_1() { //武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) var statusText = ""; var statusChars = new Array( 't','y','p','h','o','o','n',' ','s','t','a','r','t'); for (var l = 0; l < 1; l++) { for (var a = num; a < statusChars.length; a++) statusText += statusChars[a]; for (var b = 0; b < num; b++) statusText += statusChars[b]; } window.status = statusText; num++; if (num >= statusChars.length) num = 0; if (scroll) { setTimeout("scroll_wwwwumingren_1()",100); } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) scroll_wwwwumingren_1(); </SCRIPT> <form name="form1"> <input name="stopIt" type="button" value="武鸣人" onClick="if (scroll == false) scroll = true; else scroll = false;scroll_wwwwumingren_1();scroll_wwwwumingren_2();"> </form> <SCRIPT language="javascript"> var num = 0; scroll_wwwwumingren_2(); function scroll_wwwwumingren_2() { var buttonChars = new Array('武', '鸣', '人', ' ', '各', '种 ', '信 ', '息','免','费', '发', '布', ' ', '资', '源', '共','享'); var buttonText = ""; for (var a = num; a < buttonChars.length; a++) buttonText += buttonChars[a]; for (var b = 0; b < num; b++) buttonText += buttonChars[b]; num++; if (num >= buttonChars.length) num = 0; document.form1.stopIt.value = buttonText; if (scroll) { setTimeout("scroll_wwwwumingren_2();", 100); } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </SCRIPT> </body> </html>
本文来自武鸣人网站,转载请注明出处