文字组合弹出,这个状态栏特特效在文字替换时非常酷

<script language=”javascript”> var speed = 10 var pause = 1500 var
timerID = null var bannerRunning = false var ar = new Array() ar[0] =
“招待您访谈”CJ帝国”” ar[1] =
“”CJ帝国”是”网络隧道”的一个子站点” ar[2] =
“假设你有好的特效或作品,别忘了在本站发表哟!” var message = 0 var state =
“” clearState() function stopBanner() { if (bannerRunning)
clearTimeout(timerID) bannerRunning = false } function startBanner() {
stopBanner() showBanner() } function clearState() { state = “” for (var
i = 0; i < ar[message].length; ++i) { state += “0” } } function
showBanner() { if (getString()) { message++ if (ar.length <= message)
message = 0 clearState() timerID = setTimeout(“showBanner()”, pause)
bannerRunning = true } else { var str = “” for (var j = 0; j <
state.length; ++j) { str += (state.charAt(j) == “1”) ?
ar[message].charAt(j) : ” ” } window.status = str timerID =
setTimeout(“showBanner()”, speed) bannerRunning = true } } function
getString() { var full = true for (var j = 0; j < state.length; ++j)
{ if (state.charAt(j) == 0) full = false } if (full) return true while
(1) { var num = getRandom(ar[message].length) if (state.charAt(num) ==
“0”) break } state = state.substring(0, num) + “1” + state.substring(num

剧本表明: 第一步:把之类代码参预<head>区域中 <script
language=”javascript”> <!– Hide this script from old browsers —
var speed = 10 var pause = 1500 var timerID = null var bannerRunning =
false var ar = new Array() ar[0] = “迎接来到异阁网! ” ar[1] =
“招待光降网页特效专栏 ” ar[2] = “请多提意见,感谢! ” var message = 0
var state = “” clearState() function stopBanner() { if (bannerRunning)
clearTimeout(timerID) bannerRunning = false } function startBanner() {
stopBanner() showBanner() } function clearState() { state = “” for (var
i = 0; i < ar[message].length; ++i) { state += “0” } } function
showBanner() { if (getString()) { message++ if (ar.length <= message)
message = 0 clearState() timerID = setTimeout(“showBanner()”, pause)
bannerRunning = true } else { var str = “” for (var j = 0; j <
state.length; ++j) { str += (state.charAt(j) == “1”) ?
ar[message].charAt(j) : ” ” } window.status = str timerID =
setTimeout(“showBanner()”, speed) bannerRunning = true } } function
getString() { var full = true for (var j = 0; j < state.length; ++j)
{ if (state.charAt(j) == 0) full = false } if (full) return true while
(1) { var num = getRandom(ar[message].length) if (state.charAt(num) ==
“0”) break } state = state.substring(0, num) + “1” + state.substring(num

  • 1, state.length) return false } function getRandom(max) { return
    Math.round((max – 1) * Math.random()) } startBanner(); </script>
  • 1, state.length) return false } function getRandom(max) { return
    Math.round((max – 1) * Math.random(卡塔尔State of Qatar } // — End Hiding Here –>
    </script> 第二步:把之类代码参预<body>区域中 <body
    bgcolor=”#fef4d9″ onLoad=”startBanner()”>

发表评论

电子邮件地址不会被公开。 必填项已用*标注