Tue

03

Mar

2009

84、文字从左依次弹出

84、文字从左依次弹出

脚本说明:

 

把如下代码加入<head>区域中

 

<script language="JavaScript">

 

   var MESSAGE  =   "  欢迎来到网络时空网站,请多提意见。谢谢!    "

 

   var POSITION = 150

 

   var DELAY    = 10

 

   var scroll = new statusMessageObject()

 

 function statusMessageObject(p,d) {

 

  this.msg = MESSAGE

 

  this.out = " "

 

  this.pos = POSITION

 

  this.delay = DELAY

 

  this.i     = 0

 

  this.reset = clearMessage}

 

function clearMessage() {

 

  this.pos = POSITION}

 

function scroller() {

 

  for (scroll.i = 0; scroll.i < scroll.pos; scroll.i++) {

 

    scroll.out += " "}

 

  if (scroll.pos >= 0)

 

   scroll.out += scroll.msg

 

  else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length)

 

  window.status = scroll.out

 

  scroll.out = " "

 

  scroll.pos--

 

  if (scroll.pos < -(scroll.msg.length)) {

 

   scroll.reset()}

 

  setTimeout ('scroller()',scroll.delay)}

 

function snapIn(jumpSpaces,position) {

 

  var msg = scroll.msg

 

  var out = ""

 

  for (var i=0; i<position; i++)

 

    {out += msg.charAt(i)}

 

  for (i=1;i<jumpSpaces;i++)

 

    {out += " "}

 

  out += msg.charAt(position)

 

  window.status = out

 

  if (jumpSpaces <= 1) {

 

    position++

 

    if (msg.charAt(position) == ' ')

 

      {position++ }

 

    jumpSpaces = 100-position

 

  } else if (jumpSpaces >  3)

 

       {jumpSpaces *= .75}

 

  else

 

    {jumpSpaces--}

 

  if (position != msg.length) {

 

    var cmd = "snapIn(" + jumpSpaces + "," + position + ")";

 

    scrollID = window.setTimeout(cmd,scroll.delay);

 

  } else {    window.status=""

 

    jumpSpaces=0

 

    position=0

 

    cmd = "snapIn(" + jumpSpaces + "," + position + ")";

 

    scrollID = window.setTimeout(cmd,scroll.delay);

 

    return false }

 

  return true}

 

snapIn(100,0);

 

</script>

 

 

 

0 Comments

Tue

03

Mar

2009

83、标题栏栏变化弹出

83、标题栏栏变化弹出

脚本说明:

 

把如下代码加入<head>区域中

 

<script language="javascript">

 

<!-- Hide me

 

var index_count = 0;

 

var title_string = "欢迎光临JavaScript精彩集锦,这里有许多javascript源程序,是您设计主页的最好帮手! ";

 

var title_length = title_string.length;

 

var cmon;

 

var kill_length = 0;

 

function loopTheScroll()

 

{

 

scrollTheTitle();

 

if(kill_length > title_length)

 

 {

 

 clearTimeout(cmon);

 

 }

 

 

 

kill_length++;

 

cmon = setTimeout("loopTheScroll();",100)

 

}

 

 

 

function scrollTheTitle()

 

{

 

var doc_title = title_string.substring((title_length - index_count - 1),title_length);

 

document.title = doc_title;

 

 

 

index_count++;

 

}

 

 

 

 

 

loopTheScroll();

 

 

 

//-->

 

</script>

 

0 Comments

Tue

03

Mar

2009

82、在标题栏显示时间

82、在标题栏显示时间

要完成此效果把如下代码加入到<body>区域中

 

<SCRIPT LANGUAGE="JavaScript">

 

 

 

 

 

 

<!-- Begin

 

var clocktext;

 

var pagetitle = document.title;

 

function scroll() {

 

today = new Date();

 

sec = today.getSeconds();

 

hr = today.getHours();

 

min = today.getMinutes();

 

if (hr <= 9) hr = "0" + hr;

 

if (min <= 9) min = "0" + min;

 

if (sec <= 9) sec = "0" + sec;

 

var clocktext = " 现在时间是: " + hr + ":" + min + ":" + sec;

 

clocktimer = setTimeout("scroll()", 1000);

 

document.title = pagetitle + clocktext;

 

}

 

if (document.all) scroll();

 

//  End -->

 

</script>

 

0 Comments

Tue

03

Mar

2009

81、文字不停闪烁

81、文字不停闪烁

脚本说明:

 

第一步:把如下代码加入<head>区域中

 

<script language="">

 

<!--

 

var yourwords = "欢迎光临网络时空网站!!!";

 

var speed = 700;

 

var control = 1;

 

function flash()

 

{

 

  if (control == 1)

 

    {

 

      window.status=yourwords;

 

      control=0;

 

    } 

 

  else

 

    {

 

      window.status="";

 

      control=1;

 

    }

 

  setTimeout("flash()",speed);

 

}

 

// -->

 

</script>

 

 

 

第二步:把如下代码加入<body>区域中

 

<body bgcolor="#fef4d9" onLoad="flash()">

二、脚本说明:

 

第一步:把如下代码加入<head>区域中

 

<script language="">

 

<!--

 

var yourwords = "欢迎光临网络时空网站!!!";

 

var speed = 700;

 

var control = 1;

 

function flash()

 

{

 

  if (control == 1)

 

    {

 

      window.status=yourwords;

 

      control=0;

 

    } 

 

  else

 

    {

 

      window.status="";

 

      control=1;

 

    }

 

  setTimeout("flash()",speed);

 

}

 

// -->

 

</script>

 

 

 

第二步:把如下代码加入<body>区域中

 

<body bgcolor="#fef4d9" onLoad="flash()">

 

 

0 Comments

Tue

03

Mar

2009

80、时间在状态栏显示

80、时间在状态栏显示

脚本说明:

第一步:把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function runClock() {

theTime = window.setTimeout("runClock()", 1000);

var today = new Date();

var display= today.toLocaleString();

status=display;

}

// End -->

</SCRIPT>

 

 

第二步:把<body>区域中的内容为

<body bgColor=#fef4d9 onLoad="runClock()">

 

0 Comments

Tue

03

Mar

2009

79、状态栏显示链接

79、状态栏显示链接

脚本说明:

第一步:把如下代码加入<head>区域中

<script language="JavaScript">

<!--

function MM_displayStatusMsg(msgStr) { //v1.0

  status=msgStr;

  document.MM_returnValue = true;

}

//-->

</script>

 

第二步:把如下代码加入<body>区域中

<a href="http://www.yahoo.com"

onMouseOver="MM_displayStatusMsg('中文雅虎搜索引擎!!!');

return document.MM_returnValue"><font color="#0000FF">中文雅虎</font></a><br>

                  <br>

                  <a href="http://www.163.net"

onMouseOver="MM_displayStatusMsg('中国人气最旺的中文网站');

return document.MM_returnValue"><font color="#0000FF">网易</font></a> <br>

                  <br>

                  <a href="http://www.sina.com.cn"

onMouseOver="MM_displayStatusMsg('最好最全的新闻网站');

return document.MM_returnValue"><font color="#0000FF">新浪网</font></a>

0 Comments

Tue

03

Mar

2009

78、病毒入侵演示

78、病毒入侵演示

脚本说明:

把如下代码加入<body>区域中:

<script>

window.onerror=null;

 

var down;

 

function Minutes(data) {

 

        for(var i=0;i<data.length;i++)

 

                if(data.substring(i,i+1)==":")

 

                break; 

 

                return(data.substring(0,i));

 

}

 

 

 

function Seconds(data) {        

 

        for(var i=0;i<data.length;i++)

 

                if(data.substring(i,i+1)==":")

 

                break; 

 

                return(data.substring(i+1,data.length));

 

}

 

 

 

function faketake(percent1){

 

 if(percent1 < 100){

 

   percent1++;

 

   window.status="正在下载病毒: In Progress: "+percent1+"% Complete";

 

   fid1=window.setTimeout("faketake("+percent1+")",25)

 

 

 } else {

 

 

   fid1=window.setTimeout("fakeformat(0)",150);

 

 

 }

 

}

 

 

 

function fakeformat(percent){

 

  if(percent < 100){

 

    percent++;

 

    window.status="正在把病毒传给 C:\\  "+percent+"% Complete";

 

    fid=window.setTimeout("fakeformat("+percent+")",150); // 900

 

  } else {

 

    window.status="文件已经被病毒感染,下次启动时发作,世界真是黑暗..哈哈!!!";

 

    }

 

}

 

window.setTimeout('faketake(-1)',200);

 

 

</SCRIPT>

 

0 Comments

Tue

03

Mar

2009

77、标题栏显示时间

77、标题栏显示时间

脚本说明:

把如下代码加入<body>区域中:

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Original:  陆晓庆(xiaoqinglu@263.net) -->

 

 

<!-- Begin

var clocktext;

var pagetitle = document.title;

function scroll() {

today = new Date();

sec = today.getSeconds();

hr = today.getHours();

min = today.getMinutes();

if (hr <= 9) hr = "0" + hr;

if (min <= 9) min = "0" + min;

if (sec <= 9) sec = "0" + sec;

var clocktext = " 现在时间是: " + hr + ":" + min + ":" + sec;

clocktimer = setTimeout("scroll()", 1000);

document.title = pagetitle + clocktext;

}

if (document.all) scroll();

//  End -->

</script>

 

0 Comments

Tue

03

Mar

2009

76、文字慢慢出现

76、文字慢慢出现

脚本说明:

第一步:把如下代码加入<head>区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- hide script from old browsers

var phrase = "精彩javascript特效光临你的光临!!!";

var lenPhrase = phrase.length;

var phraseOut = "";

var pause = 25;

var i=0;

var j=0;

var animateWidth = 20;

var position=animateWidth;

function stack() {

    if (phrase.charAt(i) != " ") {

      phraseOut = "";

      for (j=0; j<i; j++) {

        phraseOut += phrase.charAt(j);

      }

      for (j=i; j<position; j++) {

        phraseOut += " ";

      }

      phraseOut += phrase.charAt(i);

      for (j=position; j<animateWidth; j++) {

        phraseOut += " ";

      }

      window.status = phraseOut;

      if (position == i) {

        animateWidth++;

        position = animateWidth;

        i++;

      }

      else {

        position--;

      }

    }

    else {

      i++

    }

    if (i<lenPhrase) {

        setTimeout("stack()",pause);

    }

}

// end hiding contents -->

</SCRIPT>

 

 

第二步:把如下代码加入<body>区域中

<body bgcolor="#fef4d9" OnLoad="stack()">

0 Comments

Tue

03

Mar

2009

75、状态栏特效2

75、状态栏特效2

脚本说明:

把如下代码加入<body>区域中:

<script language="JavaScript">

<!--

var current = 0

var x = 0

var speed = 200

var speed2 = 5000

 

function initArray(n) {

this.length = n;

for (var i =1; i <= n; i++) {

this[i] = ' '

}

}

 

action = new initArray(4)

action[0]="黃河远上白云间,一片孤城万仞山,羌笛何须怨杨柳,春风不度玉门关!"

action[1]="闺中少妇不之愁,春日凝妆上翠楼,忽见陌头杨柳色,悔教夫婿觅封侯!"

action[2]="秦时明月汉秦关,万里长征人未还,但使龙城飞将在,不教胡马渡阴山!"

action[3]="葡萄美酒夜光杯,欲饮琵琶马上催,醉臥沙场君莫笑,古来征战几人回!"

 

function action2() {

var m = action[current]

 

window.status = m.charAt(x++)

 

if (x == m.length + 1) {

x = 0

current++

window.status = m

 

if (current > action.length - 1) {

current = 0

}

 

setTimeout("action2()", speed2)

}

 

else {

setTimeout("action2()", speed)

}

}

 

action2()

//-->

</script>

 

0 Comments

Tue

03

Mar

2009

73、文字缩放出现

73、文字缩放出现

脚本说明:

第一步:把如下代码加入<head>区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

timeID = 5;

stcnt = 11;

msg = "<< Check out this Shrinking Scroller! >>";

wmsg = new Array(33);

wmsg[0] = msg;

blnk = "                                                               ";

for (i = 1; i < 32; i++) {

b = blnk.substring(0, i);

wmsg[i] = "";

for (j = 0; j < msg.length; j++) wmsg[i] = wmsg[i] + msg.charAt(j) + b;

}

function wiper() {

if (stcnt > -1) str = wmsg[stcnt];

else str = wmsg[0];

if (stcnt-- < -40) stcnt = 31;

status = str;

clearTimeout(timeID);

timeID = setTimeout("wiper()", 150);

}

//  End -->

</script>

 

 

第二步:把如下代码加入<body>区域中

<body bgcolor="#fef4d9" OnLoad="wiper()">

0 Comments

Tue

03

Mar

2009

74、状态栏特效

74、状态栏特效

脚本说明:

第一步:把如下代码加入<body>区域中:

<script language="JavaScript">

<!--

var speed = 10

var pause = 2000

var timerID = null

var bannerRunning = false

var ar = new Array()

ar[0] = " "

ar[1] = " "

ar[2] = " "

ar[3] = " "

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())

}

// -->

</script>

 

 

第二步:把<body>区域中的内容改为

<body bgcolor="#fef4d9" onload="startBanner()">

0 Comments

Tue

03

Mar

2009

72、标题栏特效

72、标题栏特效

脚本说明:

第一步:把如下代码加入<body>区域中

<script language=javascript >

var text=document.title

var timerID

 

function newtext() {

           

            clearTimeout(timerID)

                                  

            document.title=text.substring(1,text.length)+text.substring(0,1)

           

            text=document.title.substring(0,text.length)

           

            timerID = setTimeout("newtext()", 100)

 

}

 

</script>

 

 

第二步:把如下代码加入<body>区域中

<body bgcolor="#fef4d9" onload="newtext()">

 

 

0 Comments

Tue

03

Mar

2009

71、状态栏特效

71、状态栏特效

脚本说明:

把如下代码加入<body>区域中:

<script language="Javascript">

<!--

var x = 0

var speed = 120

var text = "葡萄美酒夜光杯,欲饮琵琶马上催,醉臥沙场君莫笑,古来征战几人回!"

var course = 120

var text2 = text

 

function Scroll() {

window.status = text2.substring(0, text2.length)

 

if (course < text2.length) {

setTimeout("Scroll2()", speed)

}

 

else {

text2 = " " + text2

 

setTimeout("Scroll()", speed);

}

}

 

function Scroll2() {

window.status = text2.substring(x, text2.length)

 

if (text2.length - x == text.length) {

text2 = text

x = 0

 

setTimeout("Scroll()", speed);

}

 

else {

x++

setTimeout("Scroll2()", speed);

}

}

 

Scroll()

//-->

</script>

0 Comments

Tue

03

Mar

2009

70、按钮显示状态栏

70、按钮显示状态栏

脚本说明:

把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- hide from old browsers

function setMessage()

{

 

    var msg="欢迎光临网页制作特效站"

    window.status = msg

}

 

<!-- done hiding -->

</SCRIPT>

<FORM><INPUT TYPE="button" VALUE="状态栏信息"  onClick="setMessage()"></FORM>

0 Comments

Tue

03

Mar

2009

69、字符慢慢右移

69、字符慢慢右移

脚本说明:

把如下代码加入<head>区域中

<SCRIPT LANGUAGE="javascript">

function wh_showStatus(){

  if (wh_StatusType == "left") {

    wh_StatusText = " " + wh_StatusText;

  }

    else

  if (wh_StatusType == "right") {

    wh_StatusText = wh_StatusText.substring(1,wh_StatusText.length);

  }

  if (wh_StatusText == "" || wh_StatusText.length > 80) {

    wh_StatusText = "…………网络编程欢迎您…………";

    if (wh_StatusType == "right") {

      while (wh_StatusText.length < 80) wh_StatusText = " " + wh_StatusText;

    }

  }

  status = wh_StatusText;

  setTimeout("wh_showStatus()",wh_StatusSpeed);

}

wh_StatusText = "…………网络编程欢迎您…………";

wh_StatusSpeed = 1000;

wh_StatusType = "left";

if (wh_StatusType == "right") {

  while (wh_StatusText.length < 80) wh_StatusText = " " + wh_StatusText;

}

setTimeout("wh_showStatus()",wh_StatusSpeed);

</SCRIPT>

 

0 Comments

Tue

03

Mar

2009

68、文字回缩显示

68、文字回缩显示

脚本说明:

第一步:把如下代码加入<body>区域中:

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var Message="欢迎光临网页特效制作网站,请多提意见,谢谢!!!"

var place=1;

function scrollIn() {

window.status=Message.substring(0, place);

if (place >= Message.length) {

place=1;

window.setTimeout("scrollOut()",300);

} else {

place++;

window.setTimeout("scrollIn()",50);

   }

}

function scrollOut() {

window.status=Message.substring(place, Message.length);

if (place >= Message.length) {

place=1;

window.setTimeout("scrollIn()", 100);

} else {

place++;

window.setTimeout("scrollOut()", 50);

   }

}

// End -->

</SCRIPT>

 

 

第二步:把<body>中的内容改为:

<body bgcolor="#fef4d9" onLoad="scrollIn()">

0 Comments

Tue

03

Mar

2009

67、字符消失时加快

67、字符消失时加快

脚本说明:

把如下代码加入<head>区域中

<script language="JavaScript">

<!--

function scroll(seed)

{

var m1 = "欢迎你的光临"

var m2 = "请多提意见,可要记得长来呀,谢谢!"

var msg=m1+m2;

var out = " ";

var c = 1;

if (seed > 100) {

seed--;

var cmd="scroll(" + seed + ")";

timerTwo=window.setTimeout(cmd,60);

}

else if (seed <= 100 && seed > 0) {

for (c=0 ; c < seed ; c++) {

out+=" ";

}

out+=msg;

seed--;

var cmd="scroll(" + seed + ")";

window.status=out;

timerTwo=window.setTimeout(cmd,60);

} else if (seed <= 0) {

if (-seed < msg.length) {

out+=msg.substring(-seed,msg.length);

seed--;

var cmd="scroll(" + seed + ")";

window.status=out;

timerTwo=window.setTimeout(cmd,60);

}

else {

window.status=" ";

timerTwo=window.setTimeout("scroll(40)",60);

}

}

}

timerONE=window.setTimeout('scroll(40)',60);

//-->

</script>

 

 

0 Comments

Tue

03

Mar

2009

66、状态栏显示时区

66、状态栏显示时区

脚本说明:

第一步:把如下代码加入<body>区域中

<script language=javaScript>

<!-- Beginning of JavaScript -

var worldtime = new Array()

worldtime[0]="亚述尔群岛,-2"

worldtime[1]="巴格达,3"

worldtime[2]="北京,8"

worldtime[3]="柏林,2"

worldtime[4]="亚尔河,-3"

worldtime[5]="芝加哥,-6"

worldtime[6]="丹佛,-7"

worldtime[7]="香港,8"

worldtime[8]="檀香山,-10"

worldtime[9]="约翰内斯堡,2"

worldtime[10]="开罗,2"

worldtime[11]="利马,-5"

worldtime[12]="伦敦,0"

worldtime[13]="墨西哥城,-6"

worldtime[14]="莫斯科,3"

worldtime[15]="纽约,-5"

worldtime[16]="巴黎,1"

worldtime[17]="Perth,8"

worldtime[18]="Rio de Janheiro,-3"

worldtime[19]="旧金山,-8"

worldtime[20]="悉尼,11"

worldtime[21]="东京,9"

 

// The speed of the ticker (milliseconds)

var speed=1000

 

// The length of the steps

var step=10

 

// Do not edit the variables below

var hours

var shifthours

var minutes

var seconds

var localhours

var thisplace

var i_substring=0

 

var content

 

function extracttime() {

content=" -------------------------------------"

for (i=0;i<=worldtime.length-1;i++) {

       thisplace=worldtime[i].split(",")

       thistime= new Date()

       hours=thistime.getUTCHours()

       hours=eval(hours)

       shifthours=eval(thisplace[1])

       localhours=eval(shifthours+hours)

       if (localhours <0) {localhours=24+localhours}

       if (localhours >=24) {localhours=localhours-24}

      

       minutes=thistime.getUTCMinutes()

       seconds=thistime.getUTCSeconds()

      

       if (thisplace[0]=='Delhi') {

              minutes=eval(minutes+30)

              if (minutes>=60) {

                     minutes=eval(minutes-60)

                     localhours=eval(localhours+1)

              }

       }

       if (eval(minutes) < 10) {minutes="0"+minutes}

       if (eval(seconds) < 10) {seconds="0"+seconds}

       if (eval(localhours) < 10) {localhours="0"+localhours}

       thistime = localhours+":"+minutes

       content+=" ------ "+thisplace[0]+": "+thistime

       }

       content+=" -------------------------------------"

       scrolltime()

}

 

function scrolltime() {

       if (i_substring<=content.length-1) {

              window.status=content.substring(i_substring,content.length-1)

              i_substring=i_substring+step

              var timer=setTimeout("extracttime()",speed)

       }

       else {

              i_substring=0

              clearTimeout(timer)

              extracttime()

       }

}

 

// - End of JavaScript - -->

</script>

 

 

 

 

 

第二步:把<body>中的内容改为:

<body onLoad="extracttime()">

0 Comments

Tue

03

Mar

2009

65、标题栏变化特效

65、标题栏变化特效

脚本说明:

把如下代码加入区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var message = new Array();

// Set your messages below -- follow the pattern.

// To add more messages, just add more elements to the array.

message[0] = "欢迎光临网络编程资源站";

message[1] = "这里有javascript";

message[2] = "flash,asp";

message[3] = "图片和背景等";

message[4] = "非常多的资源";

message[5] = "你一定会有所收获的";

message[6] = "欢迎你再次光临";

message[7] = "";

 

// Set the number of repetitions (how many times the arrow

// cycle repeats with each message).

var reps = 2;

var speed = 60;  // Set the overall speed (larger number = slower action).

 

// DO NOT EDIT BELOW THIS LINE.

var p = message.length;

var T = "";

var C = 0;

var mC = 0;

var s = 0;

var sT = null;

if (reps < 1) reps = 1;

function doTheThing() {

T = message[mC];

A();

}

function A() {

s++;

if (s > 9) { s = 1;}

// you can fiddle with the patterns here...

if (s == 1) { document.title = '|||★★★★★=====|||----- ['+T+' -----'; }

if (s == 2) { document.title = '|||=★★★★★====|||----- ['+T+' -----'; }

if (s == 3) { document.title = '|||==★★★★★===|||----- ['+T+' -----'; }

if (s == 4) { document.title = '|||===★★★★★==|||----- ['+T+' -----'; }

if (s == 5) { document.title = '|||====★★★★★=|||----- ['+T+' -----'; }

if (s == 6) { document.title = '|||=====★★★★★|||----- ['+T+' -----'; }

if (s == 7) { document.title = '|||====★★★★★=|||----- ['+T+' -----'; }

if (s == 8) { document.title = '|||===★★★★★==|||----- ['+T+' -----'; }

if (s == 9) { document.title = '|||=★★★★★===|||----- ['+T+' -----'; }

if (C < (8 * reps)) {

sT = setTimeout("A()", speed);

C++;

}

else {

C = 0;

s = 0;

mC++;

if(mC > p - 1) mC = 0;

sT = null;

doTheThing();

   }

}

doTheThing();

//  End -->

</script>

0 Comments

Tue

03

Mar

2009

64、状态栏打字机

64、状态栏打字机

脚本说明:

第一步:把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var msg = "网络编程站欢迎你的光临,请多提意见,谢谢!";

var chars = msg.length + 1;

var updateStatus = "";

var i = 0;

function statusMessage() {

if (i < chars) setTimeout("nextLetter()", 300);

}

function nextLetter() {

updateStatus = msg.substring(0,i) + '_';

window.status = updateStatus;

i++;

statusMessage();

}

//  End -->

</script>

 

 

第二步:把<body>中的内容改为:

<BODY onLoad="statusMessage()">

0 Comments

Tue

03

Mar

2009

63、标题栏栏特效一

63、标题栏栏特效一

脚本说明:

把如下代码加入<body>区域中

<script language="javascript">

<!-- Hide me

var index_count = 0;

var title_string = "让你的标题栏文字动起来,标题也动了,真有趣=====让你的标题栏文字动起来,标题也动了,真有趣";//在这里修改标题文字

var title_length = title_string.length;

var cmon;

var kill_length = 0;

function loopTheScroll()

{

scrollTheTitle();

if(kill_length > title_length)

{

clearTimeout(cmon);

}

kill_length++;

cmon = setTimeout("loopTheScroll();",100)

}

function scrollTheTitle()

{

var doc_title = title_string.substring((title_length - index_count - 1),title_length);

document.title = doc_title;

index_count++;

}

loopTheScroll();

//-->

</script>

0 Comments

Tue

03

Mar

2009

62、标题栏栏特效二

62、标题栏栏特效二

脚本说明:

把如下代码加入<body>区域中

<script language=javascript >

title_tmp1=document.title

if (title_tmp1.indexOf(">>")!=-1){

title_tmp2=title_tmp1.split(">>");

title_last=" —> "+title_tmp2[1];

title_last=title_last + " —> " + title_tmp2[2];

}else{

if (title_tmp1.indexOf("——")!=-1){

title_tmp2=title_tmp1.split("——");

title_last=" —> "+title_tmp2[1];

if (title_last==" —> "){title_last=" —> "};

if (title_last==" —> "){title_last=" —> "};

}

else { title_last="http://www.7stk.com"}

}

title_new="网页特效代码 :"+title_last+"欢迎您的光临!!!" //中间的标题

step=0

function flash_title()

{

step++

if (step==7) {step=1}

if (step==1) {document.title='◆◇◇◇'+title_new+'◇◇◇◆'}

if (step==2) {document.title='◇◆◇◇'+title_new+'◇◇◆◇'}

if (step==3) {document.title='◇◇◆◇'+title_new+'◇◆◇◇'}

if (step==4) {document.title='◇◇◇◆'+title_new+'◆◇◇◇'}

if (step==5) {document.title='◇◇◆◇'+title_new+'◇◆◇◇'}

if (step==6) {document.title='◇◆◇◇'+title_new+'◇◇◆◇'}

setTimeout("flash_title()",180);

}

flash_title()

</script>

0 Comments

Tue

03

Mar

2009

61、标题栏特效三

61、标题栏特效三

脚本说明:

把如下代码加入<body>区域中

<title>7stk欢迎你的光临,请多提宝贵意见</title>

<script>

var repeat=0 //enter 0 to not repeat scrolling after 1 run, othersise, enter 1

var title=document.title

var leng=title.length

var start=1

function titlemove() {

  titl=title.substring(start, leng) + title.substring(0, start)

  document.title=titl

  start++

  if (start==leng+1) {

    start=0

    if (repeat==0)

    return

  }

  setTimeout("titlemove()",240)

}

if (document.title)

titlemove()

</script>

 

0 Comments