Mon

02

Mar

2009

30、字符在按钮和状态栏上显示

30、字符在按钮和状态栏上显示

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

 

<SCRIPT language="javascript">

 

var scroll = true;

var num = 0;

function scrollStatus() {

       

        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("scrollStatus()",100);

                }

        }

scrollStatus();

 

 

</SCRIPT>

<form name="form1">

<input name="stopIt" type="button" value="Stop Scrolling"

onClick="       if (scroll == false)

                        scroll = true;

                else

                        scroll = false;

                scrollStatus();

                scrollButton();

        ">

</form>

 

<SCRIPT language="javascript">

 

var num = 0;

scrollButton();

 

function scrollButton() {

        var buttonChars = new Array('S', 't', 'o', 'p', ' ', 'S', 'c', 'r', 'o', 'l', 'l', 'i',

 

'n', 'g', ' ', ' ');

        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("scrollButton();", 100);

                }

        }

 

</SCRIPT>

 

0 Comments

Mon

02

Mar

2009

29、字符在状态栏中左右弹动

29、字符在状态栏中左右弹动

要完成此效果把如下代码加入到<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

Mon

02

Mar

2009

28、文字在状态栏上从左往右一个一个地显示

28、文字在状态栏上从左往右一个一个地显示

<script language="JavaScript">

var msg = "欢迎来到网页特效,请多提意见。谢谢! " ;

var interval = 120

var spacelen = 120;

var space10=" ";

var seq=0;

function Scroll() {

len = msg.length;

window.status = msg.substring(0, seq+1);

seq++;

if ( seq >= len ) {

seq = 0;

window.status = '';

window.setTimeout("Scroll();", interval );

}

else

window.setTimeout("Scroll();", interval );

}

Scroll();

</script>

0 Comments

Mon

02

Mar

2009

27、让标题栏文字动起来的特效

27、让标题栏文字动起来的特效

<html>

<head>

<title></title>

<script language="JavaScript">

var msg="欢迎来到网页特效,各种乐趣无限..."

var delay=200

function scrollTitle() {

window.document.title=msg

msg=msg.substring(1,msg.length)+msg.substring(0,1)

timeID=setTimeout("scrollTitle()",delay)

 

}

</script>

</head>

<body onload="scrollTitle()">

 

</body>

</html> 

 

 

0 Comments

Mon

02

Mar

2009

26、间隔状态栏跑马灯

26、间隔状态栏跑马灯

脚本说明:

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

<SCRIPT language="JavaScript">

<!--

function scrollit(seed) {

var m1 = "HI:你 !             ";

var m2 = " 访         ";

var m3 = " 见,谢 !          ";

var m4 = "我们的音乐网站:http://www.7stk.com      ";

var m5 = "http://www.7stk.com         ";

var msg=m1+m2+m3+m4+m5;

var out = " ";

var c = 1;

if (seed > 100) {

seed--;

cmd="scrollit("+seed+")";

timerTwo=window.setTimeout(cmd,100);

}

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

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

out+=" ";

}

out+=msg;

seed--;

window.status=out;

cmd="scrollit("+seed+")";

timerTwo=window.setTimeout(cmd,100);

}

else if (seed <= 0) {

if (-seed < msg.length) {

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

seed--;

window.status=out;

cmd="scrollit("+seed+")";

timerTwo=window.setTimeout(cmd,100);

}

else {

window.status=" ";

timerTwo=window.setTimeout("scrollit(100)",75);

}

}

}

 

 

//-->

 

 

</SCRIPT>

 

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

<body background=bag.gif onLoad="scrollit(100)">

 

 

0 Comments

Mon

02

Mar

2009

25、一个闪动的标题栏特效

25、一个闪动的标题栏特效

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

 

<title></title>

<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="JavaScript Fairyland"+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>

 

 

 

    状态栏和标题栏代码

1 Comments

Mon

02

Mar

2009

24、状态栏字符跳动

24、状态栏字符跳动

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

 

<script language="">

var yourwords = "  2259 ";

var speed = 700;

var control = 1;

function flash()

{

  if (control == 1)

    {

      window.status=yourwords;

      control=0;

    } 

  else

    {

      window.status="";

      control=1;

    }

  setTimeout("flash()",speed);

}

window.onload=flash

</script>

 

 

0 Comments

Mon

02

Mar

2009

23、状态栏多条提示字符出现

23、状态栏多条提示字符出现

要完成此效果需要两个步骤

 

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

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function mklist(n)

{

  this.length=n;

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

    this[c]=0;

  }

  return this;

}

 

function browserdelay()

{

  var retval=500;

  if (navigator.userAgent.indexOf("Win") != 0) {

    retval=150;

  }

  else if (navigator.userAgent.indexOf("Mac") != 0) {

    retval=500;

  }

  else if (navigator.userAgent.indexOf("X11") != 0) {

    retval=750;

  }

  return retval;

}

 

function mkcfg(n)

{

  this.num=1;

  this.seed=0;

  this.list=new mklist(n);

  this.type=new mklist(n);

  this.delay=browserdelay();

  this.timer=0;

  this.showurl=(5 * 1000);

  this.looping=true;

  this.msgdisp=(4 * 1000);

  this.barwidth=100;

  return this;

}

 

function urlfix(obj)

{

  window.clearTimeout(window.config.timer);

  window.defaultStatus=obj.href;

  window.config.timer=window.setTimeout("sbprint()",window.config.showurl);

  return true;

}

 

function scrollit_r2l()

{

  var out=" ";

  var c=0;

 

  if (window.config.seed <= window.config.barwidth && window.config.seed > 0) {

    for (c=0 ; c < window.config.seed ; c++) {

      out+=" ";

    }

    out+=window.config.list[window.config.num];

    window.config.seed--;

    window.status=out;

    window.config.timer=window.setTimeout("scrollit_r2l()",window.config.delay);

  }

  else if (window.config.seed <= 0) {

    if (-window.config.seed < window.config.list[window.config.num].length) {

      out+=window.config.list[window.config.num].substring(-window.config.seed,window.config.list[window.config.num].length);

      window.config.seed--;

      window.status=out;

      window.config.timer=window.setTimeout("scrollit_r2l()",window.config.delay);

    }

    else {

      window.status=" ";

      window.config.num++;

      window.config.timer=window.setTimeout("sbprint()",window.config.msgdisp);

    }

  }

}

 

window.config=new mkcfg(7);

window.config.list[1]="这里改写你的第一条信息";

window.config.type[1]=0;

window.config.list[2]="这里改写你的第二条信息";

window.config.type[2]=0;

window.config.list[3]="这里改写你的第三条信息";

window.config.type[3]=0;

window.config.list[4]="这里改写你的第四条信息";

window.config.type[4]=0;

window.config.list[5]="这里改写你的第五条信息";

window.config.type[5]=0;

window.config.list[6]="这里改写你的第六条信息";

window.config.type[6]=0;

window.config.list[7]="这里改写你的第七条信息";

window.config.type[7]=0;

 

function sbprint()

{

  if (window.config.num <= window.config.list.length) {

    if (window.config.type[window.config.num] == 0) {

      window.status=window.config.list[window.config.num];

      window.config.num++;

      window.clearTimeout(window.config.timer);

      window.config.timer=window.setTimeout('sbprint()',window.config.msgdisp);

    }

    else if (window.config.type[window.config.num] == 1) {

      window.config.seed=window.config.barwidth;

      scrollit_r2l();

    }

  }

  else if (window.config.looping) {

    window.config.num=1;

    window.clearTimeout(window.config.timer);

    window.config.timer=window.setTimeout('sbprint()',window.config.delay);

  }

}

//  End -->

</script>

 

 

第二步:把“onload="window.config.timer=window.setTimeout('sbprint()',window.config.delay);"”加在<body>区域中

例如:<body onload="window.config.timer=window.setTimeout('sbprint()',window.config.delay);">

 

0 Comments

Mon

02

Mar

2009

22、标题栏文字动起来

22、标题栏文字动起来

<!-- 要实现此效果需要 2 个步骤: -->

 

<!-- 1 步: -->

<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

 

<script language="JavaScript">

var msg="欢迎来到7stk.com,各种乐趣无限..."

var delay=200

function scrollTitle() {

window.document.title=msg

msg=msg.substring(1,msg.length)+msg.substring(0,1)

timeID=setTimeout("scrollTitle()",delay)

 

}

</script>

 

 

 

 

<!-- 2 步: -->

<!-- <BODY>中的属性代码改为: -->

 

<BODY onload="scrollTitle()">

0 Comments

Mon

02

Mar

2009

21、标题栏显示日期

21、标题栏显示日期

<!-- 要实现此效果需要 1 个步骤: -->

 

<!-- 1 步: -->

<!-- 把下面的代码加到<BODY></BODY>区域中: -->

 

<script language="JavaScript1.2">

<!--hide

var isnMonth = new

Array("1","2","3","4","5","6","7","8","9","10","11","12");

var isnDay = new

Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日");

today = new Date () ;

Year=today.getYear();

Date=today.getDate();

if (document.all)

document.title="今天是: "+Year+""+isnMonth[today.getMonth()]+Date+""+isnDay[today.getDay()]

//--hide-->

</script>

0 Comments

Mon

02

Mar

2009

20、标题栏文字变化弹出

20、标题栏文字变化弹出

<!-- 要实现此效果需要 2 个步骤: -->

 

<!-- 1 步: -->

<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var data = "0123456789";

var done = 1;

function statusIn(text) {

decrypt(text, 2, 1);

}

 

function statusOut() {

self.status = '';

done = 1;

}

 

function decrypt(text, max, delay) {

if (done) {

done = 0;

decrypt_helper(text, max, delay, 0, max);

}

}

function decrypt_helper(text, runs_left, delay, charvar, max) {

if (!done) {

runs_left = runs_left - 1;

var status = text.substring(0, charvar);

for (var current_char = charvar; current_char < text.length; current_char++) {

status += data.charAt(Math.round(Math.random()*data.length));

}

window.status = status;

var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + "," + max + ");"

var new_char = charvar + 1;

var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," + new_char + "," + max + ");"

if(runs_left > 0) {

setTimeout(rerun, delay);

}

else {

if (charvar < text.length) {

setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1)));

}

else {

done = 1;

}

}

}

}

// End -->

</script>

 

 

 

 

<!-- 2 步: -->

<!-- 把下面的代码加到<BODY></BODY>区域中: -->

 

<center>

<a href="http://www.7stk.com/"

onMouseOver="statusIn('7stk.com. [http://www.7stk.com/]');return true;"

onMouseOut="statusOut();">网页特效代码www.7stk.com</a>

</center>

 

0 Comments

Mon

02

Mar

2009

19、状态栏显示链接内容

19、状态栏显示链接内容

<!-- 要实现此效果需要 2 个步骤: -->

 

<!-- 1 步: -->

<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var data = "0123456789";

var done = 1;

function statusIn(text) {

decrypt(text, 2, 1);

}

 

function statusOut() {

self.status = '';

done = 1;

}

 

function decrypt(text, max, delay) {

if (done) {

done = 0;

decrypt_helper(text, max, delay, 0, max);

}

}

function decrypt_helper(text, runs_left, delay, charvar, max) {

if (!done) {

runs_left = runs_left - 1;

var status = text.substring(0, charvar);

for (var current_char = charvar; current_char < text.length; current_char++) {

status += data.charAt(Math.round(Math.random()*data.length));

}

window.status = status;

var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + "," + max + ");"

var new_char = charvar + 1;

var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," + new_char + "," + max + ");"

if(runs_left > 0) {

setTimeout(rerun, delay);

}

else {

if (charvar < text.length) {

setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1)));

}

else {

done = 1;

}

}

}

}

// End -->

</script>

 

 

 

 

<!-- 2 步: -->

<!-- 把下面的代码加到<BODY></BODY>区域中: -->

 

<center>

<a href="http://www.7stk.com/"

onMouseOver="statusIn('7stk.com. [http://www.7stk.com/]');return true;"

onMouseOut="statusOut();">网页特效代码www.7stk.com</a>

</center>

0 Comments

Mon

02

Mar

2009

18、标题栏出现跑马灯式

18、标题栏出现跑马灯式

<!-- 要实现此效果需要 2 个步骤: -->

 

<!-- 1 步: -->

<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

 

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

 

 

 

<!-- 2 步: -->

<!-- <BODY>中的属性代码改为: -->

 

<BODY onload="newtext()">

0 Comments

Mon

02

Mar

2009

17、标题栏里字左右弹动

17、标题栏里字左右弹动

<!-- 要实现此效果需要 1 个步骤: -->

 

<!-- 1 步: -->

<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

 

<script>

 

var message = new Array();

 

message[0] = "Welcome To You";

message[1] = "中国WEB开发者网络";

message[2] = "www.7stk.net";

 

var reps = 2;

var speed = 200;

 

 

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 > 8) { 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 (C < (8 * reps)) {

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

C++;

}

else {

C = 0;

s = 0;

mC++;

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

sT = null;

doTheThing();

}

}

doTheThing();

</script>

0 Comments

Mon

02

Mar

2009

16、状态栏一条条显示字

16、状态栏一条条显示字

<!-- 要实现此效果需要 2 个步骤: -->

 

<!-- 1 步: -->

<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

 

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

 

 

 

<!-- 2 步: -->

<!-- <BODY>中的属性代码改为: -->

 

<BODY onload="startBanner()">

 

0 Comments

Mon

02

Mar

2009

15、状态栏滚动时间

15、状态栏滚动时间

<SCRIPT language=JavaScript>

var osd = "   "

osd +="";

var timer;

var msg = "";

function scrollMaster () {

msg = customDateSpring(new Date())

clearTimeout(timer)

msg += " " + showtime() + " " + osd

for (var i= 0; i < 100; i++){

msg = " " + msg;

}

scrollMe()

}

function scrollMe(){

window.status = msg;

msg = msg.substring(1, msg.length) + msg.substring(0,1);

timer = setTimeout("scrollMe()", 200);

}

function showtime (){

var now = new Date();

var hours= now.getHours();

var minutes= now.getMinutes();

var seconds= now.getSeconds();

var months= now.getMonth();

var dates= now.getDate();

var years= now.getYear();

var timeValue = ""

timeValue += ((months >9) ? "" : " ")

timeValue += ((dates >9) ? "" : " ")

timeValue = ( months +1)

timeValue +="/"+ dates

timeValue +="/"+  years

var ap="A.M."

if (hours == 12) {

ap = "P.M."

}

if (hours == 0) {

hours = 12

}

if(hours >= 13){

hours -= 12;

ap="P.M."

}

var timeValue2 = " " + hours

timeValue2 += ((minutes < 10) ? ":0":":") + minutes + " " + ap

return timeValue2;

}

function MakeArray(n) {

this.length = n

return this

}

monthNames = new MakeArray(12)

monthNames[1] = "一月"

monthNames[2] = "二月"

monthNames[3] = "三月"

monthNames[4] = "四月"

monthNames[5] = "五月"

monthNames[6] = "六月"

monthNames[7] = "七月"

monthNames[8] = "八月"

monthNames[9] = "九月"

monthNames[10] = "十月"

monthNames[11] = "十一月"

monthNames[12] = "十二月"

daysNames = new MakeArray(7)

daysNames[1] = "周日"

daysNames[2] = "周一"

daysNames[3] = "周二"

daysNames[4] = "周三"

daysNames[5] = "周四"

daysNames[6] = "周五"

daysNames[7] = "周六"

function customDateSpring(oneDate) {

var theDay = daysNames[oneDate.getDay() +1]

var theDate =oneDate.getDate()

var theMonth = monthNames[oneDate.getMonth() +1]

var dayth=""

if ((theDate == 1) || (theDate == 21) || (theDate == 31)) {

dayth="st";

}

if ((theDate == 2) || (theDate ==22)) {

dayth="nd";

}

if ((theDate== 3) || (theDate  == 23)) {

dayth="rd";

}

return theDay + ", " + theMonth + " " + theDate + dayth + ","

}

scrollMaster();

</SCRIPT>

0 Comments

Mon

02

Mar

2009

14、状态栏文字从左弹出

14、状态栏文字从左弹出

<script language="JavaScript">

 

 var msg  = "欢迎来到网页特效网站,请多提意见。谢谢!    " ;

 

var interval = 120

 

var spacelen = 120;

 

var space10=" ";

 

var seq=0;

 

function Scroll() {

 

len = msg.length;

 

window.status = msg.substring(0, seq+1);

 

seq++;

 

if ( seq >= len ) {

 

seq = 0;

 

window.status = '';

 

window.setTimeout("Scroll();", interval );

 

}

 

else

 

window.setTimeout("Scroll();", interval );

 

}

 

Scroll();

 

</script>

 

</head>

 

0 Comments

Mon

02

Mar

2009

13、状态栏显示标准时钟

13、状态栏显示标准时钟

<SCRIPT language="JavaScript">

 

       function doClock() {

 

              window.setTimeout( "doClock()", 1000 );

 

              today = new Date();

 

              self.status = today.toString();

 

    }

 

</SCRIPT>

</head>

 

<body onLoad="doClock()">

 

0 Comments

Mon

02

Mar

2009

12、输入字符出现状态栏

12、输入字符出现状态栏

<script language="JavaScript">

 

Ret = prompt('你这里输入什么,在状态栏上就会显示什么',"你这里输入什么,在状态栏上就会显示什么")

 

var temp

var f =

"                                                                  "

var f = f + (Ret)

var speedtogo = 50

 

var counter

 

 

function scrollon() {

       

   temp  = f.substring(0,1);

   f += temp

   f    = f.substring(1,100);

   window.status = f.substring(0,100);

 

  counter    = setTimeout("scrollon()",speedtogo);

 

 }

 

</script>

</head>

 

<body onLoad="scrollon()">

0 Comments

Mon

02

Mar

2009

11、状态栏文字分解出现

11、状态栏文字分解出现

<SCRIPT LANGUAGE="JavaScript">

 

<!-- hide from old browsers

 

 

var str=""

var direction="left"

 

function createArray(n)

{

    for (var i = 0; i < n; i++) {this[i] = 0}

    return this

}

 

var js_mult1=3141

var js_mult2=5821

var js_m1=100000000

var js_m2=10000

var js_iseed=0

var js_iseed1=0

var js_iseed2=0

 

 

function random(n)

{

    if (js_iseed == 0)

    {

        now = new Date()

        js_iseed = now.getHours() + now.getMinutes() * 60

                    + now.getSeconds() * 3600

    }

    js_iseed1 = js_iseed / js_m2

    js_iseed2 = js_iseed % js_m2

    var tmp = (((js_iseed2 * js_mult1 + js_iseed1 * js_mult2) % js_m2) *

                js_m2 + (js_iseed2 * js_mult2)) % js_m1

    js_iseed = (tmp + 1) % js_m1

    return (Math.floor((js_iseed/js_m1) * n))

}

 

 

 

msgArray = createArray(5)

msgArray[0] = "欢迎你的光临,网页特效站欢迎你"

msgArray[1] = "你一定会有更多收获的"

msgArray[2] = "记得要经常来呀,网页特效站欢迎你"

msgArray[3] = "你可以给我写信,网页特效站欢迎你"

msgArray[4] = "有空记得常常点击"

 

msg = ""

dmsg = ""

 

 

function doMessage()

{

    if (msg == dmsg) // reset and delay

    {

       

        msg = msgArray[random(5)]

       

       

        dmsg = ""

        for (var ii = 0; ii < msg.length; ii++) dmsg += " "

       

       

        JSCTimeOutID = window.setTimeout('doMessage()',100)

        return true

    }

   

    // pick a character

    var ii = random(msg.length)

   

  

    var astr = dmsg.substring(0, ii)

    var bstr = msg.substring(ii, ii+1)

    var cstr = dmsg.substring(ii+1, dmsg.length)

   

  

    dmsg = astr+bstr+cstr

    window.status = dmsg

   

   

    JSCTimeOutID = window.setTimeout('doMessage()',50)

   

  

    return true

}

 

<!-- done hiding -->

 

</SCRIPT>

</head>

 

<body onload="JSCTimeOutID = window.setTimeout('doMessage()',500);">

0 Comments

Mon

02

Mar

2009

10、状态栏特殊效果

10、状态栏特殊效果

<script language="JavaScript">

 

  <!-- Funny text script by Bart Jellema

    var hellotext="网页特效欢迎你"

    var thetext=""

    var started=false

    var step=0

    var times=1

 

    function welcometext()

    {

      times--

      if (times==0)

      {

        if (started==false)

        {

          started = true;

          window.status = hellotext;

          setTimeout("anim()",1);

        }

        thetext = hellotext;

      }

    }

 

    function showstatustext(txt)

    {

      thetext = txt;

      setTimeout("welcometext()",4000)

      times++

    }

 

    function anim()

    {

      step++

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

      if (step==1) {window.status='>==='+thetext+'===<'}

      if (step==2) {window.status='=>=='+thetext+'==<='}

      if (step==3) {window.status='>=>='+thetext+'=<=<'}

      if (step==4) {window.status='=>=>'+thetext+'<=<='}

      if (step==5) {window.status='==>='+thetext+'=<=='}

      if (step==6) {window.status='===>'+thetext+'<==='}

      setTimeout("anim()",200);

    }

  // Funny text script by Bart Jellema -->

 

</script>

</head>

 

<body onLoad="welcometext()">

0 Comments

Mon

02

Mar

2009

9、状态栏文字慢慢滑动

9、状态栏文字慢慢滑动

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

</head>

 

<body OnLoad="stack()">

0 Comments

Mon

02

Mar

2009

8、文字从中间扩散出现

8、文字从中间扩散出现

<SCRIPT LANGUAGE="JavaScript">

<!-- hide script from old browsers

var phrase = "本站真诚欢迎你的光临,请多提意见!!!记得要经常光临,谢谢!! ";

var lenPhrase = phrase.length;

var phraseOut = "";

var pause = 100;

var i=0;

var j=0;

function explode() {

    i++;

    phraseOut = "";

    for (j=1; j<=(lenPhrase/2)-i; j++) {

      phraseOut += "  ";

    }

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

      phraseOut += phrase.charAt(j-1);

    }

    for (j=i; j>=1; j--) {

      phraseOut += phrase.charAt(lenPhrase-j);

    }

    for (j=1; j<=(lenPhrase/2)-i; j++) {

      phraseOut += "  ";

    }

    window.status = phraseOut;

    if (i<lenPhrase/2) {

        setTimeout("explode()",pause);

    }

}

// end hiding contents -->

</SCRIPT>

</head>

 

<body OnLoad="explode()">

<br>

<br>

<center><font color=red face="隶书" size=6>文字从前后出现</font></center>

<br>

<center>

<table border=5 bordercolor=blue borderlight=green>

<tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>状态栏为效果显示区!</strong></font></td></tr>

</table></center>

<br>

<br>

<center>

 <SCRIPT LANGUAGE="JavaScript">

 

<!-- hide

 

function goHist(a)

 

{

 

   history.go(a);

 

}

 

//-->

 

</script>

 

0 Comments

Mon

02

Mar

2009

7、状态栏虚拟格式化盘

7、状态栏虚拟格式化盘

<script language="JavaScript">

 

<!--

// Copyright 1996 Jon Eyrick - scripter@actionaccess.com

window.onerror=null;

var down;var min1,sec1;var cmin1,csec1,cmin2,csec2;

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

        cmin2=1*Minutes(document.sw.disp1.value);      

        csec2=0+Seconds(document.sw.disp2.value);

        DownRepeat();

}

function DownRepeat() {

        csec2--;       

        if(csec2==-1) {

                csec2=59; cmin2--;

        }       

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

        }

function D() { 

        cmin2=1*Minutes(document.sw.disp1.value);      

        csec2=0+Seconds(document.sw.disp2.value);

        DRepeat();

}

function DRepeat() {   

        csec2--;        

        if(csec2==-1) {

                csec2=59; cmin2--;

        }      

        self.status="Document: Done";

        }

function faketake(percent1){

if(percent1 < 100){

percent1++;

window.status="Upload of drive C:\\ in progress: "+percent1+"% complete";

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

}else{

window.status="Upload of hard drive complete.. Now deleting...";Down();}}

function fakeformat(percent){

if(percent < 100){

percent++;

window.status="Format of drive C:\\ in progress: "+percent+"% complete";

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

}else{

window.status="Format of hard drive complete...";D();}}

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

// End -->

 

</script>

 

<br>

<br>

<center>

 

<SCRIPT LANGUAGE="JavaScript">

 

<!-- hide

function goHist(a)

{

   history.go(a);

}

//-->

</script>

0 Comments

Mon

02

Mar

2009

6、标题栏里的打字效果

6、标题栏里的打字效果

<script language="JavaScript1.2">

var message="欢迎进入网页特效"

var message=message+" "

i="0"

var temptitle=""

var speed="150"

function titler(){

if (!document.all&&!document.getElementById)

return

document.title=temptitle+message.charAt(i)

temptitle=temptitle+message.charAt(i)

i++

if(i==message.length)

{

i="0"

temptitle=""

}

setTimeout("titler()",speed)

}

window.onload=titler

</script>

 

0 Comments

Mon

02

Mar

2009

5、状态栏文字不停闪烁

5、状态栏文字不停闪烁

<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 onLoad="flash()">

 

<br>

 

<br>

 

<center> </center>

 

<br>

 

<br>

 

<br>

 

<center>

 

 <SCRIPT LANGUAGE="JavaScript">

 

 

 

<!-- hide

 

 

 

function goHist(a)

 

 

 

{

 

 

 

   history.go(a);

 

 

 

}

 

 

 

//-->

 

 

 

</script>

 

0 Comments

Mon

02

Mar

2009

4、状态栏文字从右弹出

4、状态栏文字从右弹出

 

 

<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

Mon

02

Mar

2009

3、状态栏上的摆动文字

3、状态栏上的摆动文字

<html>

 

<head>

<title>网页特效---状态栏上的摆动文字</title>

<meta content="text/html; charset=gb2312" http-equiv="Content-Type">

</head>

 

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

 

 

<p align="center"><font face="隶书" size="5" color="#0000FF">状态栏上的摆动文字</font></p>

 

<table width="101%" height="163">

  <tr>

    <td width="50%" colspan="2" height="18"></td>

  </tr>

  <tr>

    <td width="8%" height="137"> </td>

    <td width="21%" height="137"><font face="隶书" size="5" color="#FF00FF">?? </font>

      <p><font face="隶书" size="5" color="#FF00FF">?? </font><strong><font

face="幼圆" size="4" color="#000000">注意下面的状态栏一行文字来回摆动,是不是别有一番韵味。</font></strong></p>

      <p> </td>

  </tr>

</table>

 

<p align="center"><font face="隶书" size="5" color="#FF00FF">??? </font></p>

 

<p> </p>

</body>

</html>

 

0 Comments

Mon

02

Mar

2009

2、酷的状态栏效果显示

2、酷的状态栏效果显示

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

 

</head>

 

 

 

<body onLoad="scrollIn()">

0 Comments

Mon

02

Mar

2009

1、状态栏文字来回出现

1、状态栏文字来回出现

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

 

</head>

 

 

 

<body onLoad="scrollIn()">

 

0 Comments