上一页       3     4     5     6            下一页

 

文字特效代码5

 

Thu

26

Feb

2009

150、飘动的漂亮文字

150、飘动的漂亮文字

脚本说明:

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

<script language="JavaScript1.2">

 

//configure message

message="www.7stk.com欢迎你的光临!!!"

//animate text in NS6? (0 will turn it off)

ns6switch=1

 

var ns6=document.getElementById&&!document.all

mes=new Array();

mes[0]=-1;

mes[1]=-4;

mes[2]=-7;mes[3]=-10;

mes[4]=-7;

mes[5]=-4;

mes[6]=-1;

num=0;

num2=0;

txt="";

function jump0(){

if (ns6&&!ns6switch){

jump.innerHTML=message

return

}

if(message.length > 6){

for(i=0; i != message.length;i++){

txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};

jump.innerHTML=txt;

txt="";

jump1a()

}

else{

alert("Your message is to short")

}

}

 

function jump1a(){

nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0

nfinal.style.left=-num2;

if(num2 != 9){

num2=num2+3;

setTimeout("jump1a()",50)

}

else{

jump1b()

}

}

 

function jump1b(){

nfinal.style.left=-num2;

if(num2 != 0){num2=num2-3;

setTimeout("jump1b()",50)

}

else{

jump2()

}

}

 

function jump2(){

txt="";

for(i=0;i != message.length;i++){

if(i+num > -1 && i+num < 7){

txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"

}

else{txt=txt+"<span>"+message.charAt(i)+"</span>"}

}

jump.innerHTML=txt;

txt="";

if(num != (-message.length)){

num--;

setTimeout("jump2()",50)}

else{num=0;

setTimeout("jump0()",50)}}

</script>

<h2><div id="jumpx" style="color:green"></div></h2>

<script>

if (document.all||document.getElementById){

jump=(document.getElementById)? document.getElementById("jumpx") : document.all.jumpx

jump0()

}

else

document.write(message)

</script>

 

0 Comments

Thu

26

Feb

2009

149、右上角固定的滚动文字

149、右上角固定的滚动文字

脚本说明:

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

<script language="JavaScript">

<!--

if (document.all){

 

msg="---http://www.7stk.com/fine";

msgColor="0000ff";

msgFont="Verdana";//Some fonts work better than others, Verdana is smoothest!

 

//Nothing needs altering below!

msg=msg.split('');

n=msg.length;

e=360/n;

yp=0;

xp=0;

yb=40;

xb=60;

sa=0.07;

sb=0;

pa=new Array();

pb=new Array();

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

document.write('<div id="logo" style="position:absolute;top:0;left:0;'

+'height:30;width:30;font-family:'+msgFont+';text-align:center;color:'+msgColor+'">'+msg[i]+'</div>');

}

function ani(){

yp=document.body.scrollTop+50;

xp=document.body.scrollLeft+window.document.body.clientWidth-100;

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

logo[i].style.top =yp+yb*Math.sin(sb+i*e*Math.PI/180);

logo[i].style.left=xp+xb*Math.cos(sb+i*e*Math.PI/180);

pb[i]=logo[i].style.pixelTop-yp;

pa[i]=pb[i]-pb[i]*2;

if (pa[i] < 1){

pa[i]=0;

logo[i].style.visibility='hidden';

}

else logo[i].style.visibility='visible';

logo[i].style.fontSize=pa[i]/2.7;

}

sb-=sa;

setTimeout('ani()',100);

}

window.onload=ani;

}

// -->

</script>

 

0 Comments

Thu

26

Feb

2009

148、文字显示精彩特效

148、文字显示精彩特效

脚本说明:

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

<STYLE>

.let {

       COLOR: white; FILTER: Shadow (Color="#6699CC", Direction="135")wave(Add="0", Phase="4", Freq="9", LightStrength="20", Strength="1"); FONT-FAMILY: Verdana; FONT-WEIGHT: bold; WIDTH: 500px

}

</STYLE>

<SCRIPT language=JavaScript>

var regel = 0;                //row to start with

var size = 20;                //size of font

var delay = 1200;         //Delay between messages in msecs

var speed = 20;                    //Hmmmmmm

var step = 10;                //Size of each step

 

 

var sent = new Array()

{

sent[0] = "欢迎光临7stk";

sent[1] = "本站有超过500种的javascript特效";

sent[2] = "这些特效主要是来自国外的一些相关站点";

sent[3] = "每星期都有15种左右的特效与您见面";

sent[4] = "只要你经常光临,就一定会有收获的!";

sent[5] = "JavaScript再次谢谢你的光临!";

}

 

sent[sent.length] = sent[0];var veran = 0;var num = 0;var x = 0;//Don't change

function moto(){output = "";for(letter = 0;letter<sent[regel+1].length;letter++){

if(veran == letter){if(x==0){num=num+step;}else{num=num-step;}gr = size-num;

if(gr < 1){x=1;gr=1;}if(gr>size)gr=size;

output += "<font style='font-size:"+gr +"pt'>"+sent[regel+x].substring(letter, letter+1)+"</font>";

if(num < 0 && x==1){veran++;x=0;}}else{if(veran > letter){

output += "<font style='font-size:"+size +"pt'>"+sent[regel+1].substring(letter, letter+1)+"</font>";

}else{output += "<font style='font-size:"+size +"pt'>"+sent[regel].substring(letter, letter+1)+"</font>";}}}

return output;}function startmot(){if(regel==sent.length-1)regel=0;balk.innerHTML = moto();

if(veran==sent[regel+1].length){regel++;veran = 0;setTimeout("startmot()", delay);}else{

setTimeout("startmot()", speed);}}

 

</SCRIPT>

 

<TABLE align=center bgColor=#008000 height=60 id=tafel

onclick='location="http://www.7stk.com"' style="CURSOR: hand"

  width=500><TBODY>

  <TR>

    <TD bgColor=#ff6666>

      <DIV align=center class=let id=balk></DIV></TD></TR></TBODY></TABLE>

 

 

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

<body onload=startmot()>

 

0 Comments

Thu

26

Feb

2009

147、精彩变色文字

147、精彩变色文字

脚本说明:

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

<STYLE type=text/css>.nav {

       COLOR: #0000ff; FONT-FAMILY: Times; FONT-SIZE: 16pt; LEFT: 20px; POSITION: absolute; TEXT-DECORATION: none

}

</STYLE>

<SCRIPT>

<!-- Beginning of JavaScript -

 

var i_strength=0

var max_strength=6

var shadowcolor="red"

var timer

var speed=40

var thisobj

 

function gotoURL(){

      var newWindow=window.open("http://www.7stk.com","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

function gotoURL1(){

      var newWindow=window.open("http://www.7stk.com/fine/zhufu/zhu07.htm","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

function gotoURL2(){

      var newWindow=window.open("http://www.7stk.com/fine/ch/c01.htm","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

function gotoURL3(){

      var newWindow=window.open("http://www.7stk.com/fine/ny/n1.htm","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

function gotoURL4(){

      var newWindow=window.open("http://www.yahoo.com","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

 

function stopfilter(thisdiv){

    if (document.all) {

        clearTimeout(timer)

           thisobj=thisdiv

        thisobj.style.filter=" "

    }

}

 

 

function startfilter(thisdiv){

    if (document.all) {

        clearTimeout(timer)

           thisobj=thisdiv

        morefilter()

    }

}

 

function morefilter(){

    if (i_strength <=max_strength) {

           thisobj.style.filter="glow(color="+shadowcolor+", strength="+i_strength+")"

        i_strength++

        timer = setTimeout("morefilter()",speed)

    }

    else {

        clearTimeout(timer)

        lessfilter()

    }

}

 

function lessfilter(){

    if (i_strength >=0) {

           thisobj.style.filter="glow(color="+shadowcolor+", strength="+i_strength+")"

        i_strength--

        timer = setTimeout("lessfilter()",speed)

    }   

    else {

        clearTimeout(timer)

        morefilter()

    }

}

 

// - End of JavaScript - -->

</SCRIPT>

 

<DIV class=nav id=news onclick=gotoURL() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 20px">JavaScript2000 </DIV>

<DIV class=nav id=contact onclick=gotoURL1() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 60px">新浪</DIV>

<DIV class=nav id=chart onclick=gotoURL2() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 100px">网易</DIV>

<DIV class=nav id=besteller onclick=gotoURL3() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 140px">搜狐</DIV>

<DIV class=nav id=scriptkiller onclick=gotoURL4() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 180px">雅虎</DIV>

 

0 Comments

Thu

26

Feb

2009

146、变色的动态文字

146、变色的动态文字

脚本说明:

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

<div id="fader" style="position:absolute; top:35px; left:50px; width:600px; text-align:center;"></div>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

 

var texts = new Array(

"<font size='+2' color='{COLOR}' face='Arial'><strong>1stscript</strong></font>",

"<font size='+3' color='{COLOR}' face='Arial'><strong>J a v a s c r i p t</strong></font>",

"<font size='+4' color='{COLOR}' face='Arial'><strong>F l a s h</strong></font>",

"<font size='+3' color='{COLOR}' face='Arial'><strong>A s p</font>",

"<a href='http://www.1stscript.com' target='_top'><font size='+3' color='{COLOR}' face='Arial'><strong>W e l c o m e </strong></font></a>");

 

var bgcolor = "#000000"; // background color, must be valid browser hex color (not color names)

var fcolor = "#FF8000";  // foreground or font color

var steps = 20; // number of steps to fade

var show = 500; // milliseconds to display message

var sleep = 30; // milliseconds to pause inbetween messages

var loop = true; // true = continue to display messages, false = stop at last message

 

// Do Not Edit Below This Line

var colors = new Array(steps);

getFadeColors(bgcolor,fcolor,colors);

var color = 0;

var text = 0;

var step = 1;

 

// fade: magic fader function

function fade() {

 

// insert fader color into message

var text_out = texts[text].replace("{COLOR}", colors[color]); // texts should be defined in user script, e.g.: var texts = new Array("<font color='{COLOR}' sized='+3' face='Arial'>howdy</font>");

 

// actually write message to document

if (document.all) fader.innerHTML = text_out; // document.all = IE only

if (document.layers) { document.fader.document.write(text_out); document.fader.document.close(); } // document.layers = Netscape only

 

// select next fader color

color += step;

 

// completely faded in?

if (color >= colors.length-1) {

step = -1; // traverse colors array backward to fade out

 

// stop at last message if loop=false

if (!loop && text >= texts.length-1) return; // loop should be defined in user script, e.g.: var loop=true;

}

 

// completely faded out?

if (color == 0) {

step = 1; // traverse colors array forward to fade in again

 

// select next message

text += 1;

if (text == texts.length) text = 0; // loop back to first message

}

 

// subtle timing logic...

setTimeout("fade()", (color == colors.length-2 && step == -1) ? show : ((color == 1 && step == 1) ? sleep : 50)); // sleep and show should be defined in user script, e.g.: var sleep=30; var show=500;

}

// getFadeColors: fills Colors (predefined Array)

// with color hex strings fading from ColorA to ColorB

 

// note: Colors.length equals the number of steps to fade

function getFadeColors(ColorA, ColorB, Colors) {

len = Colors.length;

 

// strip '#' signs if present

if (ColorA.charAt(0)=='#') ColorA = ColorA.substring(1);

if (ColorB.charAt(0)=='#') ColorB = ColorB.substring(1);

 

// substract rgb compents from hex string

var r = HexToInt(ColorA.substring(0,2));

var g = HexToInt(ColorA.substring(2,4));

var b = HexToInt(ColorA.substring(4,6));

var r2 = HexToInt(ColorB.substring(0,2));

var g2 = HexToInt(ColorB.substring(2,4));

var b2 = HexToInt(ColorB.substring(4,6));

 

// calculate size of step for each color component

var rStep = Math.round((r2 - r) / len);

var gStep = Math.round((g2 - g) / len);

var bStep = Math.round((b2 - b) / len);

 

// fill Colors array with fader colors

for (i = 0; i < len-1; i++) {

Colors[i] = "#" + IntToHex(r) + IntToHex(g) + IntToHex(b);

r += rStep;

g += gStep;

b += bStep;

}

Colors[len-1] = ColorB; // make sure we finish exactly at ColorB

}

 

// IntToHex: converts integers between 0-255 into a two digit hex string.

function IntToHex(n) {

var result = n.toString(16);

if (result.length==1) result = "0"+result;

return result;

}

 

// HexToInt: converts two digit hex strings into integer.

function HexToInt(hex) {

return parseInt(hex, 16);

}

 

//  End -->

</script>

 

 

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

<body onLoad="fade()">

 

0 Comments

Thu

26

Feb

2009

145、双重显示的文字

145、双重显示的文字

脚本说明:

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

<script language="JavaScript1.2">

 

var message="Welcome to First Script!"

var neonbasecolor="gray"

var neontextcolor="red"

var flashspeed=100  //in milliseconds

 

///No need to edit below this line/////

 

var n=0

if (document.all){

document.write('<font color="'+neonbasecolor+'">')

for (m=0;m<message.length;m++)

document.write('<span id="neonlight">'+message.charAt(m)+'</span>')

document.write('</font>')

 

//cache reference to neonlight array

var tempref=document.all.neonlight

}

else

document.write(message)

 

function neon(){

 

//Change all letters to base color

if (n==0){

for (m=0;m<message.length;m++)

tempref[m].style.color=neonbasecolor

}

 

//cycle through and change individual letters to neon color

tempref[n].style.color=neontextcolor

 

if (n<tempref.length-1)

n++

else{

n=0

clearInterval(flashing)

setTimeout("beginneon()",1500)

return

}

}

 

function beginneon(){

if (document.all)

flashing=setInterval("neon()",flashspeed)

}

beginneon()

 

 

</script>

 

0 Comments

Thu

26

Feb

2009

144、鼠标控制滚动文字

144、鼠标控制滚动文字

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var ostat = false;

function scrollstop() {

news.scrollAmount = 0;

ostat = true;

}

function scrollplay() {

news.scrollAmount = 5;

ostat = false;

}

function scrolldir() {

mid = screen.width / 2;

mouse = event.x;

if(mouse > mid) {

if(ostat == false) {

speed = (mouse - mid) / 25;

news.scrollAmount = speed;

}

news.direction = "right";

}

else {

if(ostat == false) {

speed = (mid - mouse) / 25;

news.scrollAmount = speed;

}

news.direction = "left";

   }

}

//  End -->

</script>

 

 

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

<marquee name=news id=news behavior=scroll direction=left scrollamount=5 scrolldelay=1 hspace=0 vspace=0 onmouseover="scrollstop()" onmouseout="scrollplay()">

<b>7stk.com欢迎你的光临,请多提意见,谢谢</b>

</marquee>

 

 

 

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

<body onMouseMove="scrolldir()">

 

0 Comments

Thu

26

Feb

2009

143、显示隐藏内容

143、显示隐藏内容

脚本说明:

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

<script language="JavaScript1.2">

<!--

var head="display:''"

function doit(header){

var head=header.style

if (head.display=="none")

head.display=""

else

head.display="none"

}

//-->

</script>

<h3 style="cursor:hand" onClick="doit(document.all[this.sourceIndex+1])">显示/隐藏内容</h3>

<span style="display:none" style=&{head};>

这里是隐藏的内容

</span>

 

0 Comments

Thu

26

Feb

2009

142、文字向上滚动

142、文字向上滚动

脚本说明:

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

<STYLE type=text/css>

#divASContainer {

       CLIP: rect(0px 320px 120px 0px); HEIGHT: 120px; LEFT: 10px; OVERFLOW: hidden; POSITION: absolute; TOP: 10px; VISIBILITY: hidden; WIDTH: 250px

}

#divASContent {

       LEFT: 0px; POSITION: absolute; TOP: 0px

}

BODY {

       FONT: 11px Tahoma, Arial, Helvetica, sans-serif

}

DIV {

       FONT: 11px Tahoma, Arial, Helvetica, sans-serif

}

</STYLE>

 

<SCRIPT language=JavaScript>

// begin absolutely positioned scrollable area object scripts

function verifyCompatibleBrowser(){

       this.ver=navigator.appVersion

       this.dom=document.getElementById?1:0

       this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;

       this.ie4=(document.all && !this.dom)?1:0;

       this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

       this.ns4=(document.layers && !this.dom)?1:0;

       this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)

       return this

}

bw=new verifyCompatibleBrowser()

lstart=120

loop=true 

speed=50

pr_step=3

function ConstructObject(obj,nest){

    nest=(!nest) ? '':'document.'+nest+'.'

       this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;

      this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;

       this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight

       this.newsScroll=newsScroll;

       this.moveIt=b_moveIt; this.x; this.y;

    this.obj = obj + "Object"

    eval(this.obj + "=this")

    return this

}

function b_moveIt(x,y){

       this.x=x;this.y=y

       this.css.left=this.x

       this.css.top=this.y

}

//Makes the object scroll up

function newsScroll(speed){

       if(this.y>-this.scrollHeight){

              this.moveIt(0,this.y-pr_step)

              setTimeout(this.obj+".newsScroll("+speed+")",speed)

       }else if(loop) {

              this.moveIt(0,lstart)

              eval(this.obj+".newsScroll("+speed+")")

         }

}

//Makes the object

function InitialiseAutoScrollArea(){

       objContainer=new ConstructObject('divASContainer')

       objContent=new ConstructObject('divASContent','divASContainer')

       objContent.moveIt(0,lstart)

       objContainer.css.visibility='visible'

       objContent.newsScroll(speed)

}

// end absolutely positioned scrollable area object scripts

 

</SCRIPT>

<DIV id=divASContainer>

<DIV id=divASContent><B>Scroll Area Content Start</B>

    <P>Lorem ipsum dolor sit amet,

      consectetur adipscing elit, sed diam nonnumy eiusmod tempor incidunt ut

      labore et dolore magna aliquam erat volupat.</P>

<P>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum

soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim

placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.

Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe

eveniet ut er repudiand sint et molestia non este recusand.</P>

<P>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy

eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</P>

<P>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum

soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim

placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.

Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe

eveniet ut er repudiand sint et molestia non este recusand.</P><B>Scroll Area

Content End</B> </DIV></DIV>

 

 

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

<body bgcolor="#fef4d9" onload=InitialiseAutoScrollArea(); onBlur="self.close()">

 

0 Comments

Thu

26

Feb

2009

141、多种文字效果

141、多种文字效果

脚本说明:

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

<SCRIPT language=JavaScript1.2>

var strFaderName = 'Dynamic Text Fader 2.20';

var strCopyright = 'Copyright (c) Nicholas Poh 2000';

 

// Check for browser and version

var g_fBrowser = 0;

var navName = navigator.appName;

var navVer  = parseFloat(navigator.appVersion);

 

if (document.all) {

       // Microsoft Internet Explorer 5 or compatible

       g_fBrowser = 2;

} else if (document.getElementById) {

       // Netscape 6 or DOM compatible browser

       g_fBrowser = 3;

} else if (document.layers) {

       // Netscape 4 or compatible

       g_fBrowser = 1;

} else {

       // Sometimes Netscape 4 reaches here. So, make sure it still works.

       if (navName == "Netscape" && navVer >= 4) {

              g_fBrowser = 1;

       } else {

              // unknown and not supported

              g_fBrowser = 0;

       }

}

// End of check

 

// Global variables

var DynFaderList = new Array();         // List of Dynamic Faders

// End of Global variables

 

// Create a hex convertor array (Dex2Hex[])

var hexbase= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F");

var value=0;

var Dec2Hex=new Array();

for (x=0; x<16; x++){

       for (y=0; y<16; y++){

              Dec2Hex[value]= hexbase[x] + hexbase[y];

              value++;

       }

}

// End of create a hex convertor array (Dex2Hex[])

 

// Combine RGB colour

function RGB(r, g, b)

{

       return ((r&0xFF)<<16) + ((g&0xFF)<<8) + (b&0xFF);

}

 

// Convert RGB colour from string to numeric

function StrRGB2Num(color)

{

       var temp;

       temp = color;

       return Number('0x'+temp.substr(1,temp.length));

}

 

// Convert RGB colour to string base

function RGB2STR(rgbcolor)

{

       return Dec2Hex[rgbcolor>>16] + Dec2Hex[(rgbcolor>>8)&0xFF] + Dec2Hex[rgbcolor&0xFF];

}

 

// Find layer

function findLayer(name, doc)

{

       if (document.layers) {

              var i, layer;

      

              for (i = 0; i < doc.layers.length; i++) {

                     layer = doc.layers[i];

                     if (layer.name == name) return layer;

                     if (layer.document.layers.length > 0) {

                            layer = findLayer(name, layer.document);

                            if (layer != null) return layer;

                     }

              }

       }

       return null;

}

 

// Change the HTML text

function changeHTMLText(element, newText, object)

{

       if (document.all) {

              // Microsoft Internet Explorer 5 or compatible

              element.innerHTML = newText;

       } else if (document.getElementById) {

              // Netscape 6 or DOM compatible browser

              rng = document.createRange();

              rng.setStartBefore(element);

              htmlFrag = rng.createContextualFragment(newText);

              while (element.hasChildNodes()) element.removeChild(element.lastChild);

              element.appendChild(htmlFrag);

       } else if (document.layers) {

              // Netscape 4 or compatible

              strTemp = '<DIV CLASS="' + object.name + '">' + newText + '</DIV>';

             

              element.document.open();

              element.document.fgColor = object.curcolor & 0xFFFFFF;             

              element.document.writeln(strTemp);

              element.document.close();

       }

}

 

function insertPlaceHolder(strName, width, height, align, bgcolor, border, bordercolor)

{

       if (String(width)  =="undefined") var width   = "100%";

       if (String(height) =="undefined") var height  = 100;

       if (String(align)  =="undefined") var align   = "left";

       if (String(bgcolor)=="undefined") var bgcolor = "";

       if (String(border) =="undefined") var border  = 0;

       if (String(bordercolor)=="undefined") var bordercolor = "";

      

       if (g_fBrowser == 0) {

              document.writeln("Browser not supported");

              return;

       }

 

       switch(g_fBrowser) {

       case 1:

              document.writeln(

                     '<TABLE ALIGN="' + align + '" CELLSPACING="0" CELLPADDING="0" BORDER="' + border + '" BORDERCOLOR="' + bordercolor + '">' +

                     '<TR><TD>' +

                     '<ILAYER NAME="' + strName + '" BGCOLOR="' + bgcolor + '" VISIBILITY="inherit">' +

                     '<LAYER NAME="Content" WIDTH=' + width + ' HEIGHT=' + height + ' VISIBILITY="inherit">' +

                     '</LAYER>' +

                     '</ILAYER>' +

                     '</TD></TR>' +

                     '</TABLE>'

              );

              break;

 

       case 2:

       case 3:

              document.writeln(

                     '<DIV ALIGN=' + align + '>' +

                     '<DIV ID="'+strName+'" STYLE="width:' + width +'; height:' + height + '; overflow:hidden; background:'+bgcolor+'; border-style:outset; border-width:'+border+'; border-color:'+bordercolor+'">' +

                     '<DIV ID="'+strName+'Content" STYLE="position:relative; width:100%;">' +

                     '</DIV>' +

                     '</DIV>' +

                     '</DIV>'

              );

              break;

       }

}

 

function DynFader()

{

       this.name;

       this.width;

       this.height;

       this.contentHeight;

       this.offset  = 20;

       this.curXPos = 0;

       this.curYPos = -this.offset;

       this.curPos = 0;

       this.midYPos = 0;

       this.ydir = 1;

       this.xdir = 0;

 

       this.placeholder;

       this.content;

       this.text = new Array();

       this.curText = -1;

      

       this.loop = -1;

       this.paused = true;

       this.started = false;

       this.pauseInterval = 0;

       this.pauseTextInterval = 0;

       this.curpauseInterval = 0;

       this.fgcolor  = 0x000000;

       this.bgcolor  = 0xFFFFFF;

       this.dfcolor  = 0;

       this.curdfcolor  = 0;

       this.curcolor = 0;

       this.dfRed   = 0;

       this.dfGreen = 0;

       this.dfBlue  = 0;

      

       this.isFade = false;

      

       // Define methods

       this.addText = DynFaderAddText;

       this.attachPlaceHolder = DynFaderAttachPlaceHolder;

       this.setTextColor = DynFaderSetTextColor;

       this.start = DynFaderStart;

       this.stop = DynFaderStop;

       this.beginFade = DynFaderBeginFade;

       this.calcColorDif = DynFaderCalcColorDif;

       this.getColorDif = DynFaderGetColorDif;

       this.setFont = DynFaderSetFont;

       this.setFontSize = DynFaderSetFontSize;

       this.setBackground = DynFaderSetBackground;

       this.setDirection = DynFaderSetDirection;

       this.setSpeed = DynFaderSpeed;

       this.setPauseMidInterval = DynFaderSetPauseMidInterval;

       this.setPauseTextInterval = DynFaderSetPauseTextInterval;

       this.getContentHeight = DynFaderGetContentHeight;

       this.setLoop = DynFaderSetLoop;

       this.setGlow = DynFaderSetGlow;

      

       DynFaderList[DynFaderList.length] = this;

}

 

function DynFaderAddText(newText)

{

       this.text[this.text.length] = newText;

}

 

function DynFaderAttachPlaceHolder(strPlaceHolder)

{

       switch(g_fBrowser) {

       case 1:

              this.name = strPlaceHolder;

              this.placeholder = findLayer(strPlaceHolder, document);

              this.content = this.placeholder.document.Content;

              this.width   = this.placeholder.clip.width;

              this.height  = this.placeholder.clip.height;

              this.content.top = this.curYPos;

              break;

             

       case 2:

              this.placeholder = eval('document.all.' + strPlaceHolder);

              this.content = eval('document.all.' + strPlaceHolder+'Content');

              this.width   = this.placeholder.style.pixelWidth;

              this.height  = this.placeholder.style.pixelHeight;

              this.content.style.pixelTop = this.curYPos;

              break;

             

       case 3:

              this.placeholder = document.getElementById(strPlaceHolder);

              this.content = document.getElementById(strPlaceHolder+'Content');

              this.width   = parseInt(this.placeholder.style.width);

              this.height  = parseInt(this.placeholder.style.height);

              this.content.style.top = this.curYPos;

 

              break;

       }

}

 

function DynFaderSetTextColor(r, g, b)

{

       this.fgcolor = RGB(r, g, b);

       switch(g_fBrowser) {

       case 1:

              this.content.document.fgColor = this.fgcolor;

              break;

             

       case 2:

              this.content.style.color = this.fgcolor;

              break;

 

       case 3:

              this.content.style.color = "#" + RGB2STR(this.fgcolor);

              break;

       }

}

 

function DynFaderSetTextColor(strColor)

{

       if (isNaN(strColor)) this.fgcolor = StrRGB2Num(strColor);

       this.curcolor = this.fgcolor;

       switch(g_fBrowser) {

       case 1:

              this.content.document.fgColor = this.color;

              break;

             

       case 2:

              this.content.style.color = this.fgcolor;

              break;

 

       case 3:

              this.content.style.color = "#" + RGB2STR(this.fgcolor);

              break;

       }

}

 

function DynFaderStart()

{

       if (this.ydir > 0) {

              this.curYPos = this.height + 1;

       } else {

              this.curYPos = -this.getContentHeight() - 1;

       }

       this.started = true;

}

 

function DynFaderStop()

{

       this.started = false;

}

 

function DynFaderBeginFade()

{

       this.calcColorDif();

       this.isFade = true;

       this.start();

}

 

function DynFaderCalcColorDif()

{

       switch(g_fBrowser) {

       case 1:

              this.bgcolor = this.placeholder.bgColor;

              if (this.bgcolor == null) this.bgcolor = StrRGB2Num(document.bgColor);

              break;

 

       case 2:

       case 3:

              this.bgcolor = StrRGB2Num(this.placeholder.style.backgroundColor);

              if (isNaN(this.bgcolor)) this.bgcolor = StrRGB2Num(document.bgColor);

              break;

       }

 

       this.dfRed   = ((this.bgcolor>>16) - (this.fgcolor>>16));

       this.dfGreen = (((this.bgcolor>>8)&0xFF) - ((this.fgcolor>>8)&0xFF));

       this.dfBlue  = ((this.bgcolor&0xFF) - (this.fgcolor&0xFF));

       this.curcolor = this.bgcolor;

}

 

function DynFaderGetColorDif(steps)

{

       steps  += this.height;

       steps >>= 1;

       steps  /= Math.abs(this.ydir);

       this.curdfcolor = this.dfcolor = -(((this.dfRed/steps)<<16) + ((this.dfGreen/steps)<<8) + (this.dfBlue/steps));

}

 

function DynFaderSetFont(fontfamily, fontweight, textalign)

{

       switch(g_fBrowser) {

       case 1:

              if (fontfamily) document.classes[this.name].all.fontFamily = fontfamily;

              if (fontweight) document.classes[this.name].all.fontWeight = fontweight;

              if (textalign)  document.classes[this.name].all.textAlign = textalign;

              break;

             

       case 2:

       case 3:

              if (fontfamily) this.content.style.fontFamily = fontfamily;

              if (fontweight) this.content.style.fontWeight = fontweight;

              if (textalign)  this.content.style.textAlign  = textalign;

              break;

       }

}

 

function DynFaderSetFontSize(fontsize)

{

       // Unit is required for Netscape 6

       if (!isNaN(fontsize)) fontsize += 'pt';

 

       switch(g_fBrowser) {

       case 1:

              if (fontsize) document.classes[this.name].all.fontSize = fontsize;

              break;

             

       case 2:

              this.content.style.fontSize = fontsize;

              break;

 

       case 3:

              this.content.style.fontSize = fontsize;

              break;

       }

}

 

function DynFaderSetBackground(image)

{

       switch(g_fBrowser) {

       case 1:

              this.placeholder.background.src = image;

              break;

             

       case 2:

       case 3:

              this.placeholder.style.backgroundImage = 'url('+image+')';

              break;

       }

}

 

function DynFaderSetDirection(iDir)

{

       switch(iDir) {

       case 0:

              this.ydir = Math.abs(this.ydir);

              break;

             

       case 1:

              this.ydir = -Math.abs(this.ydir);

              break;

             

       default:

              this.ydir = Math.abs(this.ydir);

       }

}

 

function DynFaderSpeed(Speed)

{

       if (this.ydir > 0) {

              this.ydir = Math.abs(Speed);

       } else {

              this.ydir = -Math.abs(Speed);

       }

}

 

function DynFaderSetPauseMidInterval(time)

{

       this.pauseInterval = Math.abs(time);

}

 

function DynFaderSetPauseTextInterval(time)

{

       this.pauseTextInterval = Math.abs(time);

}

 

function DynFaderGetContentHeight()

{

       switch(g_fBrowser) {

       case 1:

              this.contentHeight = this.content.document.height;

              break;

 

       case 2:

              this.contentHeight = this.content.clientHeight;

              break;

 

       case 3:

              this.contentHeight = this.content.offsetHeight;

              break;

       }

       return this.contentHeight;

}

 

function DynFaderSetLoop(loops)

{

       this.loop = loops;

}

 

function DynFaderSetGlow(strength, glowColor, fgColor)

{

       switch(g_fBrowser) {

       case 1:

              break;

             

       case 2:

              if (String(fgColor) != "undefined") this.setTextColor(fgColor);

              this.content.style.filter = "glow(color="+glowColor+",strength="+strength+")";

              break;

 

       case 3:

              break;

       }

}

 

// Scrolling section

function ScrollFader()

{

       var fader;

       if (String(DynFaderList[0]) == "undefined") return;

      

       for (var i in DynFaderList) {

              fader = DynFaderList[i];

              if (fader.started == false) continue;

              if (fader.paused) {

                     if (fader.curpauseInterval-- <= 0) {

                            fader.paused = false;

                     }

              } else {

                     fader.curYPos += fader.ydir;

//                   fader.curXPos += fader.xdir;

                    

                     if (fader.curYPos == fader.midYPos) {

                            if (fader.pauseInterval) {

                                   fader.curpauseInterval = fader.pauseInterval;

                                   fader.paused = true;

                            }

                            fader.curYPos = (fader.height - fader.contentHeight) >> 1;

                            if (fader.isFade) {

                                   fader.curdfcolor = -fader.dfcolor;

                                   fader.curcolor = fader.fgcolor;

                            }

                     }

 

                     if (fader.isFade) {

                            // Change text colour

                            switch(g_fBrowser) {

                            case 1:

                                   if (fader.curText >= 0) {

                                          changeHTMLText(fader.content, fader.text[fader.curText], fader);

                                   }

                                   break;

 

                            case 2:

                                   fader.content.style.color = fader.curcolor;

                                   break;

                                  

                            case 3:

                                   fader.content.style.color = "#" + RGB2STR(fader.curcolor);

                                   break;

                            }

                           

                            fader.curcolor+= fader.curdfcolor;

                     }

                    

                     if (fader.curYPos > fader.height || fader.curYPos < -fader.contentHeight) {

                            // Prepare for next text

                            var ShowCopyright = false;

                            if (++fader.curText > fader.text.length - 1) {

                                   // End of text array reached

                                   fader.curText = 0;

                                   if (this.loop == -1) {

                                          // infinite loop

                                          if (Math.round(Math.random()*20) == 7) {

                                                 ShowCopyright = true;

                                                 fader.curText = -1;

                                          }

                                   } else {

                                          if (--fader.loop == 0) {

                                                 // Last loop reached

                                                 fader.stop();

                                          }                                       

                                   }

                            }

 

                            // Rewrite the text

                            switch(g_fBrowser) {

                            case 1:

                                   fader.content.top = fader.height;

                                   break;

                           

                            case 2:

                                   fader.content.style.pixelTop = fader.height;

                                  

                            case 3:

                                   fader.content.style.top = fader.height;

                                   break;

                            }

                            if (ShowCopyright) {

                                   changeHTMLText(fader.content, strFaderName + '<BR>' + strCopyright, fader);

                            } else {

                                   changeHTMLText(fader.content, fader.text[fader.curText], fader);

                            }

 

                           

                            // Reset values

                            fader.getContentHeight();

                           

                            if (fader.isFade) {

                                   fader.getColorDif(fader.contentHeight);

                                   fader.curcolor = fader.bgcolor;

                            }

                            if (fader.ydir > 0) {

                                   fader.midYPos = ((fader.height - fader.contentHeight) >> 1) + fader.contentHeight;

                                   fader.midYPos = (Math.round(fader.midYPos / fader.ydir) * fader.ydir) - fader.contentHeight;

                                   fader.curYPos = -fader.contentHeight;

                            } else {

                                   fader.midYPos = ((fader.height - fader.contentHeight) >> 1) + fader.height;

                                   fader.midYPos = (Math.round(fader.midYPos / fader.ydir) * fader.ydir) - fader.height;

                                   fader.curYPos = fader.height;

                            }

 

                            if (fader.pauseTextInterval) {

                                   fader.curpauseInterval = fader.pauseTextInterval;

                                   fader.paused = true;

                            }

                     }

             

                     // Scroll text

                     switch(g_fBrowser) {

                     case 1:

                            fader.content.top = fader.curYPos;

                            break;

                           

                     case 2:

                            fader.content.style.pixelTop = fader.curYPos;

                            break;

 

                     case 3:

                            fader.content.style.top = fader.curYPos;

                            break;

                     }

              }

       }

}

 

// Start timer

var g_timerID;

 

if (g_fBrowser == 1) {

       var g_winWidth;

       var g_winHeight;

 

       g_winWidth  = window.innerWidth;

       g_winHeight = window.innerHeight;

       window.captureEvents(Event.RESIZE);

       window.onResize = FaderReload;

}

 

setTimeout('FaderStart()', 600);

 

function FaderStart()

{

       g_timerID = setInterval(ScrollFader, 20);

       window.onUnload = FaderUnload;

}

 

function FaderUnload(e)

{

       clearInterval(g_timerID);

       return window.routeEvent(e);

}

 

function FaderReload(e)

{

       if (g_winWidth == window.innerWidth && g_winHeight == window.innerHeight) return;

       this.location.href = this.location.href;

       this.focus();

 

       return window.routeEvent(e);;

}

 

</SCRIPT>

 

<SCRIPT language=JavaScript1.2>

       function runMe()

       {

              // create fader

              var myFader1 = new DynFader();

              // add text

              myFader1.addText('This is the first fader');

              myFader1.addText('Image as background?');

              myFader1.attachPlaceHolder("FaderWithBackground");

              myFader1.setBackground('toad.gif');

              myFader1.setFont('Comic Sans MS', 'bold', 'center');

              myFader1.setFontSize(15);

              myFader1.setTextColor('#0000FF');

              myFader1.beginFade();

              // create fader        

              var myFader2 = new DynFader();

              // add text

              myFader2.addText('This is the second fader');

              myFader2.addText('The background is transparent');

              myFader2.addText('Code downloaded from <A HREF="http://www.egroups.com/group/hWinMain">hWinMain List</A>');

              // initialize fader

              myFader2.attachPlaceHolder("FaderWithTransparentBackground");

              myFader2.setDirection(1);

              myFader2.setTextColor('#FF00FF');

              myFader2.setFont('Verdana', 'bold', 'center');

              myFader2.setSpeed(4);

              myFader2.setPauseMidInterval(30);

              myFader2.setPauseTextInterval(10);

              myFader2.beginFade();

 

 

              // create fader

              var myFader3 = new DynFader();

              // add text

              myFader3.addText('This is the third fader');

              myFader3.addText('The background is green');

              myFader3.addText('Yes! I have border!');

              // initialize fader

              myFader3.attachPlaceHolder("FaderWithColourBackground");

              myFader3.setTextColor('#0000FF');

              myFader3.setFont('Verdana', 'bold', 'center');

              myFader3.setSpeed(4);

              myFader3.setPauseMidInterval(30);

              myFader3.setPauseTextInterval(10);

              myFader3.start();

 

              // create fader

              var myFader4 = new DynFader();

              // add text

              myFader4.addText('This is the fourth fader without fading effect');

              if (document.all)

                     myFader4.addText("Hey! I'm glowing!");

              else

                     myFader4.addText("Sigh... I'm not glowing (Netscape)");

              myFader4.addText('The background is black');

              myFader4.addText('<DIV ALIGN=LEFT>Left aligned</DIV>');

              myFader4.addText('<DIV ALIGN=CENTER>Center aligned</DIV>');

              myFader4.addText('<DIV ALIGN=RIGHT>Right aligned</DIV>');

              // initialize fader

              myFader4.attachPlaceHolder("FaderNoFade");

              myFader4.setTextColor('#9FA06F');

              myFader4.setTextColor('#ffffff');

              myFader4.setFont('Verdana', 'bold', 'center');

              myFader4.setGlow(5, 'white', 'yellow');

              myFader4.setDirection(1);

              myFader4.setPauseMidInterval(30);

              myFader4.start();

       }

</SCRIPT>

<TABLE align=center border=2 cellPadding=2 cellSpacing=2 width=640>

  <TBODY>

  <TR>

    <TD>

      <SCRIPT>insertPlaceHolder("FaderWithBackground", 640, 50, 'center')</SCRIPT>

    </TD></TR>

  <TR>

    <TD>

      <TABLE border=1 cellPadding=1 cellSpacing=1 width="100%">

        <TBODY>

        <TR>

          <TD bgColor=yellow width=200>

            <P><B>警告:</B><BR></P>

            <P>如果你使用的是NS浏览器的话,你的显示会变得很慢</P></TD>

          <TD>

            <TABLE border=0 cellPadding=2 cellSpacing=2 width="100%">

              <TBODY>

              <TR>

                <TD>

                  <SCRIPT>insertPlaceHolder("FaderWithTransparentBackground", 300, 50, 'center')</SCRIPT>

                </TD></TR>

              <TR>

                <TD>

                  <HR SIZE=2>

                </TD>

              <TR>

                <TD>

                  <SCRIPT>insertPlaceHolder("FaderWithColourBackground", 300, 50, 'center', '#00FF00', 4, 'green')</SCRIPT>

                </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>

  <TR>

    <TD>

      <SCRIPT>insertPlaceHolder("FaderNoFade", 640, 20, 'center', '#000000')</SCRIPT>

    </TD></TR></TBODY></TABLE>

 

 

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

<body bgcolor="#fef4d9" onload=runMe();>

 

0 Comments

Thu

26

Feb

2009

140、动态变化说明文字

140、动态变化说明文字

脚本说明:

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

<SCRIPT language=JavaScript1.2 type=text/javascript>

prefix="";

arNews = [

"欢迎你光临网络编程资源站 www.7stk.com .","http://www.7stk.com",

"<font color=green>这里有许多你建站时需要的东东,flashjavascript,背景库,图片库.</font>","",

"<font color=red>如果你觉得本站内容确实不错的话请帮忙推荐给你的好友谢谢了.</font>","http://www.7stk.com"

]

</SCRIPT>

 

<SCRIPT language=JavaScript1.2

type=text/javascript>

FDRboxWid = 400;

 FDRboxHgt = 14;

 FDRborWid = 1;

 FDRborCol = "#f7f7f7";

 FDRborSty = "solid";

 FDRbackCol = "#f7f7f7";

 FDRboxPad = 1;

 

 FDRtxtAln = "center";

 FDRlinHgt = "12px";

 FDRfntFam = "Verdana,Arial,宋体";

 FDRfntCol = "#000000";

 FDRfntSiz = "12px";

 FDRfntWgh = "";

 FDRfntSty = "normal";

 FDRlnkCol = "#000000";

 FDRlnkDec = "underline";

 FDRhovCol = "#000000";

 

 FDRgifSrc = "";

 FDRgifInt = 60;

 

 FDRblendInt = 5;

 FDRblendDur = 1;

 FDRmaxLoops = 100;

 

 FDRendWithFirst = true;

 FDRreplayOnClick = true;

 

 FDRjustFlip = false;

 FDRhdlineCount = 0;

 

NS4 = (document.layers);

IE4 = (document.all);

 

appVer = navigator.appVersion;

IEmac = (IE4 && appVer.indexOf("Mac") != -1);

IE4mac = (IEmac && appVer.indexOf("MSIE 4") != -1);

IE40mac = (IE4mac && appVer.indexOf("4.0;") != -1);

IE45mac = (IE4mac && appVer.indexOf("4.5;") != -1);

NSpre401 = (NS4 && (parseFloat(appVer) <= 4.01));

NSpre403 = (NS4 && (parseFloat(appVer) <= 4.03));

 

FDRjustFlip = (window.FDRjustFlip) ? FDRjustFlip : false;

FDRhdlineCount = (window.FDRhdlineCount) ? FDRhdlineCount : 1;

 

FDRfinite = (FDRmaxLoops > 0);

FDRisOver = false;

FDRloadCount = 0;

 

blendTimer = null;

 

if (!window.prefix) prefix = "";

window.onload = FDRcountLoads;

 

if (NS4) {

if(FDRjustFlip || NSpre403) {

totalLoads = 1;

FDRfadeImg = new Object();

FDRfadeImg.width = FDRboxWid - (FDRborWid*2);;

}

else {

totalLoads = 2;

FDRfadeImg = new Image();

FDRfadeImg.onload = FDRcountLoads;

FDRfadeImg.onerror = FDRcountLoads;

FDRfadeImg.src = FDRgifSrc;

}

}

 

function FDRcountLoads(e) {

if (IE4) {

setTimeout("FDRinit()",1);

}

else {

if(e.type == "error") FDRjustFlip = true;

FDRloadCount++;

if (FDRloadCount==totalLoads) {

origWidth = innerWidth;

origHeight = innerHeight;

window.onresize = function(){

if (innerWidth==origWidth && innerHeight==origHeight) return;

location.reload();

}

FDRinit();

}

}

}

 

function FDRinit(){

if(!window.arNews) {

if(!window.arTXT || !window.arURL) return;

if(arTXT.length != arURL.length) return;

arNews = [];

for (i=0;i<arTXT.length;i++){

arNews[arNews.length] = arTXT[i];

arNews[arNews.length] = arURL[i];

}

}

 

 if (NS4) {

 if (!document.elFader) return;

with(document.classes.newslink.A) {

textDecoration = FDRlnkDec;

color = FDRlnkCol;

fontWeight = FDRfntWgh;

fontSize = FDRfntSiz;

fontStyle = FDRfntSty;

fontFamily = FDRfntFam;

lineHeight = FDRlinHgt;

textAlign = FDRtxtAln;

}

with(document.classes.nolink.P) {

color = FDRfntCol;

fontWeight = FDRfntWgh;

fontSize = FDRfntSiz;

fontStyle = FDRfntSty;

fontFamily = FDRfntFam;

lineHeight = FDRlinHgt;

textAlign = FDRtxtAln;

}

 elFader = document.elFader;

with (elFader) {

document.write(" ");

document.close();

bgColor = FDRborCol;

clip.width = FDRboxWid;

clip.height = FDRboxHgt;

}

 

contWidth = FDRboxWid - (FDRborWid*2);

contHeight = FDRboxHgt - (FDRborWid*2);

elCont = new Layer(contWidth,elFader);

with (elCont) {

top = FDRborWid;

left = FDRborWid;

clip.width = contWidth;

clip.height = contHeight;

bgColor = FDRbackCol;

visibility = "inherit";

}

 

newsWidth = contWidth - (FDRboxPad*2);

newsHeight = contHeight - (FDRboxPad*2);

 elNews = new Layer(newsWidth,elCont);

with (elNews) {

top = FDRboxPad;

left = FDRboxPad;

clip.width = newsWidth ;

clip.height = newsHeight;

}

 

if (!FDRjustFlip) {

elGif = new Layer(contWidth,elCont);

 imStr = "<IMG SRC='" + FDRgifSrc +"' WIDTH="+ Math.max(FDRfadeImg.width,(FDRboxWid - (FDRborWid*2)));

imStr += (NSpre403) ? " onError='window.FDRjustFlip = true'>" : ">";

 with (elGif) {

document.write(imStr);

 document.close();

moveAbove(elNews);

}

 

imgHeight = elGif.document.height;

slideInc = (imgHeight/(FDRblendDur*1000/FDRgifInt));

startTop = -(imgHeight - FDRboxHgt);

}

 

elFader.visibility = "show";

 }

 else {

 if (!window.elFader) return;

elFader.innerHTML ="";

if(IE4mac) {

document.body.insertAdjacentHTML("BeforeBegin","<STYLE></STYLE>");

}

else {

if (!document.styleSheets.length) document.createStyleSheet();

}

with (document.styleSheets(document.styleSheets.length-1)) {

addRule("A.newslink","text-decoration:"+FDRlnkDec+";color:"+ FDRlnkCol);

addRule("A.newslink:hover","color:"+ FDRhovCol);

}

 

with (elFader.style) {

errorOffset = (IE4mac) ? (FDRboxPad + FDRborWid) : 0;

width = FDRboxWid - (errorOffset * 2);

height = FDRboxHgt - (errorOffset * 2);

if(IE4mac && !IE45mac){

pixelLeft = elFader.offsetLeft + errorOffset;

pixelTop = elFader.offsetTop + errorOffset;

}

 

backgroundColor = FDRbackCol;

overflow = "hidden";

color = FDRfntCol;

fontWeight = FDRfntWgh;

fontSize = FDRfntSiz;

fontStyle = FDRfntSty;

fontFamily = FDRfntFam;

lineHeight = FDRlinHgt;

textAlign = FDRtxtAln;

cursor = "default";

visibility = "visible";

borderWidth = FDRborWid;

borderStyle = FDRborSty;

borderColor = FDRborCol;

padding = FDRboxPad;

 

if(!FDRjustFlip) filter = "blendTrans(duration=" + FDRblendDur + ")";

}

elFader.onselectstart = function(){return false};

 

IEhasFilters = (elFader.filters.blendTrans) ? true : false;

 

 }

 

if (!NSpre401) {

elFader.onmouseover = function (){

FDRisOver = true;

}

elFader.onmouseout = function(){

FDRisOver = false;

status = "";

}

}

 

FDRstart(0);

}

 

function FDRstart(ind){

 newsCount = ind;

 if (FDRfinite) loopCount = 0;

 FDRdo();

 blendTimer = setInterval("FDRdo()",FDRblendInt*1000)

}

 

function FDRdo() {

if(!blendTimer && loopCount>0) return;

 

 if (FDRfinite && loopCount==FDRmaxLoops) {

 FDRend();

return;

 }

FDRfade();

 

 if (newsCount == arNews.length) {

 newsCount = 0;

 if (FDRfinite) loopCount++;

 }

}

 

function FDRmakeStr(){

tempStr = "";

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

if(newsCount>=arNews.length)break;

dispStr = arNews[newsCount];

linkStr = arNews[newsCount+1];

isLink = linkStr.length;

if (isLink) {

tempStr += "<P><A CLASS=newslink "

+ "HREF='" + prefix + linkStr + "'>"

 + dispStr + "</A></P>"

}

else {

tempStr += ((NS4) ? "<P CLASS=nolink>" : "<P>") +dispStr+"</P>";

 

}

 if(IE40mac) tempStr +="<BR>";

newsCount += 2;

}

return tempStr;

}

 

function FDRfade(){

newsStr = FDRmakeStr();

 

 if (NS4) {

if (!FDRjustFlip) {

elGif.top = startTop;

elGif.visibility = "inherit";

}

 

elNews.visibility = "hide";

 with (elNews.document) {

 write(newsStr);

 close();

 }

elNews.visibility = "inherit";

 }

 else {

 if(IEhasFilters)elFader.filters.blendTrans.Apply();

 elFader.innerHTML = newsStr;

 if(IEhasFilters)elFader.filters.blendTrans.Play();

 }

 

if(FDRhdlineCount==1) window.status = (FDRisOver && isLink) ? (prefix + linkStr) : "";

 

 if (NS4 && !FDRjustFlip) FDRslide();

}

 

function FDRslide(){

 elGif.top += slideInc;

 if (elGif.top >= 0) {elGif.visibility = "hide";return}

 setTimeout("FDRslide()",FDRgifInt);

}

 

function FDRdblClickNS(){

elFader.releaseEvents(Event.DBLCLICK);

FDRstart(startIndex);

return false;

}

 

function FDRend(){

clearInterval(blendTimer);

 

blendTimer = null;

 

if (FDRendWithFirst) {

newsCount = 0;

FDRfade();

}

if (FDRreplayOnClick) {

 

startIndex = FDRendWithFirst ? (FDRhdlineCount * 2) : 0;

if (IE4) {

elFader.title = "双击回复";

elFader.ondblclick = function(){

this.ondblclick = null;

this.title = "";

FDRstart(startIndex);

}

}

else {

elFader.captureEvents(Event.DBLCLICK);

 

elFader.ondblclick = FDRdblClickNS;

 

}

 }

}

 

</SCRIPT>

 <DIV id=elFader

      style="POSITION: relative; VISIBILITY: hidden; WIDTH: 500px">

      <DIV align=center>本站说明</DIV></DIV>

 

0 Comments

Thu

26

Feb

2009

139、用来作说明的文字

139、用来作说明的文字

脚本说明:

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

<script language="JavaScript1.2">

 

var delay=1000 //set delay between message change (in miliseconds)

var fcontent=new Array()

begintag='<font face="Arial" size=2 color=red>' //set opening tag, such as font declarations

fcontent[0]="<b>站点公告:</b><br>从今天起,本站将推出一项新的服务!<br><br>免费留言簿的申请"

fcontent[1]="经过前一段时间的调整及服务器的测试运行,本站现在已经处于一个相对比较稳定的时期!!!"

fcontent[2]="如果你有什么意见和建议,请给我们提出,你的支持是对本站发展最大的动力."

closetag='</font>'

 

var fwidth=150 //set scroller width

var fheight=120 //set scroller height

 

///No need to edit below this line/////////////////

 

var ie4=document.all&&!document.getElementById

var ns4=document.layers

var DOM2=document.getElementById

var faderdelay=0

var index=0

 

if (DOM2)

faderdelay=2000

 

//function to change content

function changecontent(){

if (index>=fcontent.length)

index=0

if (DOM2){

document.getElementById("fscroller").style.color="rgb(255,255,255)"

document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag

colorfade()

}

else if (ie4)

document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag

else if (ns4){

document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag)

document.fscrollerns.document.fscrollerns_sub.document.close()

}

 

index++

setTimeout("changecontent()",delay+faderdelay)

}

 

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////

// Modified by Dynamicdrive.com

 

frame=20;

hex=255  // Initial color value.

 

function colorfade() {                 

// 20 frames fading process

if(frame>0) { 

hex-=12; // increase color value

document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.

frame--;

setTimeout("colorfade()",20);      

}

else{

document.getElementById("fscroller").style.color="rgb(0,0,0)";

frame=20;

hex=255

}  

}

 

if (ie4||DOM2)

document.write('<div id="fscroller" style="border:1px solid black;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')

 

window.onload=changecontent

</script>

<ilayer id="fscrollerns" width=&{fwidth}; height=&{fheight};><layer id="fscrollerns_sub" width=&{fwidth}; height=&{fheight}; left=0 top=0></layer></ilayer>

 

0 Comments

Thu

26

Feb

2009

138、渐显文字效果

138、渐显文字效果

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

m = new Array()

m[0] = "这个例子还不错吧!"

m[1] = "你喜欢吗?"

m[2] = "这个可以放在公告栏中使用的!"

m[3]="<a href='http://www.7stk.com'>『网页特效代码』</a>欢迎你的光临!"

m[4]="本站域名:http://www.7stk.com"

m[5] = "请多提意见!"

m[6] = "如有问题!欢迎留言!"

m[6] = "如有问题!欢迎留言!"

 

var i=0;

 

function play_rt()

{    

rt1.style.filter="revealTrans(Duration=1.5,Transition=12)";

rt1.filters.revealTrans.apply(); //改变前一定要这一句!

rt1.innerHTML=m[i++];  //改变内容!

if(i>6){i=0} //如果显示到第六条信息就从头开始!

rt1.filters.revealTrans.play(); //播放效果了

timer = setTimeout("play_rt()",3000)  //3秒后执行"play_rt()"函数

}

</SCRIPT>

<TABLE WIDTH="260" BORDER="1">

<TR>

<TD HEIGHT="18"  id="rt1"> </TD>

</TR>

</TABLE>

 

 

 

 

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

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

 

0 Comments

Thu

26

Feb

2009

137、特殊的广告效果

137、特殊的广告效果

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

m = new Array()

m[0] = "这个例子还不错吧!"

m[1] = "你喜欢吗?"

m[2] = "这个可以放在公告栏中使用的!"

m[3]="<a href='http://www.7stk.com'>『网页特效代码』</a>欢迎你的光临!"

m[4]="本站域名:http://www.7stk.com"

m[5] = "请多提意见!"

m[6] = "如有问题!欢迎留言!"

m[7] = "欢迎你的再次光临!"

 

bagcolor = new Array()

bagcolor[0] = "#CCCCCC"

bagcolor[1] = "#FFFF66"

bagcolor[2] = "#CCFFFF"

bagcolor[3] = "#AAEEFF"

bagcolor[4] = "#CCFF88"

bagcolor[5] = "#FF9933"

bagcolor[6] = "#99AAFF"

bagcolor[7] = "#6699FF"

var i=0;

 

function Ran(R) {        

       return Math.floor((R+1)*Math.random())

}

 

function play_rt()

{    

       rt1.style.filter="revealTrans(Duration=1.5,Transition=" + Ran(22) + ")";

    rt1.filters.revealTrans.apply();

       rt1.style.background=bagcolor[Ran(7)];

       rt1.innerHTML=m[Ran(6)];

    rt1.filters.revealTrans.play();

    timer = setTimeout("play_rt()",3000)  

}

</SCRIPT>

<TABLE WIDTH="358" BORDER="1" HEIGHT="70">

<TR ALIGN="CENTER">

<TD id="rt1" HEIGHT="82"></TD>

</TR>

</TABLE>

 

 

 

 

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

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

 

0 Comments

Thu

26

Feb

2009

136、极具创意的文字显示

136、极具创意的文字显示

脚本说明:

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

<style type="text/css">

.clDivs{position:absolute; width:30; height:30; left:0; font-size:80px; font-weight:bold; font-family:arial black,arial,helvetica; color:#999999; visibility:hidden}

</style>

<script language="JavaScript" type="text/javascript">

function lib_bwcheck(){ //Browsercheck (needed)

       this.ver=navigator.appVersion

       this.agent=navigator.userAgent

       this.dom=document.getElementById?1:0

       this.opera5=this.agent.indexOf("Opera 5")>-1

       this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;

       this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;

       this.ie4=(document.all && !this.dom && !this.opera5)?1:0;

       this.ie=this.ie4||this.ie5||this.ie6

       this.mac=this.agent.indexOf("Mac")>-1

       this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;

       this.ns4=(document.layers && !this.dom)?1:0;

       this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)

       return this

}

var bw=new lib_bwcheck()

 

 

/***************************************************************************

Variables to set.

 

Remember that if you want another font, font-size or whatever you set

that in the .clDivs class in the styletag!

****************************************************************************/

numberOfLetters=11 //How many letters do you have

 

ypos=-100 //The Y position of the letters, relative to the center

 

//The x positions of the letters, relative to center.

//This is the tricky part, when you change font-size or type and letters

//be sure to play with the values in this array, if not your letters

//will not arrange correctly. (note the testing variable)

xpos=new Array()

xpos[0]=-320

xpos[1]=-270

xpos[2]=-220

xpos[3]=-170

xpos[4]=-120

xpos[5]=-70

xpos[6]=-20

xpos[7]=30

xpos[8]=80

xpos[9]=130

xpos[10]=180

 

//To make the xpos a little simpler to set you can set this value to 1

//If you do no animation will happen, but the letters will place themself

//where they will end at the end of the animation.

testing=0

 

//There are 3 different animation you can use.

//Set this variable to 1,2 or 3 for the different ones,

//or set it to 4 for random

animation=4

 

aspeed=10 //The timer animation speed.

 

 

/********************************************************************************

Object constructor

********************************************************************************/

function makeObj(obj,speed,xmove,ymove,works){

       this.el=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0; 

      this.css=bw.dom || bw.ie4?this.el.style:bw.ns4?this.el:0;

       this.moveIt=b_moveIt;

}

function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}

/***************************************************************************

Initiating page and starting animation

****************************************************************************/

var posArray,oZdivs;

function introInit(){

       pageXcenter=bw.op5||bw.ns4 ||bw.ns6?innerWidth/2:document.body.offsetWidth/2

       pageYcenter=bw.op5||bw.ns4||bw.ns6?innerHeight/2:document.body.offsetHeight/2

       oZdivs=new Array()

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

              oZdivs[i]=new makeObj('div'+i)

              oZdivs[i].moveIt(-200,0)

              oZdivs[i].css.visibility='visible'

       }

       if(animation==4) animation=Math.round(Math.random()*2)+1

       if(!testing) eval('anim'+animation+'(0)')

       else testIt()

}

function testIt(){

       alert(pageYcenter)

       for(i=0;i<oZdivs.length;i++){

           oZdivs[i].moveIt((pageXcenter+xpos[i]),(pageYcenter+ypos))

       }    

}

 

/***************************************************************************

Intro 1

****************************************************************************/

xPath1=new Array(-277,-271,-264,-255,-245,-234,-223,-210,-196,-181,-161,-134,-98,-52,1,53,98,131,151,156,147,124,92,59,0)

yPath1=new Array(-240,-206,-162,-114,-64,-16,29,71,112,151,187,217,241,255,260,254,239,213,179,143,108,77,51,30,0)

function anim1(num,test){

       if(num<oZdivs.length){

              st=test?test:0;

              animX(num,'xPath1','yPath1',aspeed,st,'anim1('+(num+1)+','+st+')')

       }else endanim(0)

}

/***************************************************************************

Intro 2

****************************************************************************/

xPath2=new Array(-285,-270,-255,-240,-225,-210,-195,-180,-165,-150,-135,-120,-105,-90,-75,-60,-45,-30,-15,0)

yPath2=new Array(-353,-344,-335,-324,-312,-299,-285,-270,-254,-236,-218,-198,-177,-155,-132,-108,-83,-56,-29,0)

function anim2(num){

       if(num<oZdivs.length){

              animX(num,'xPath2','yPath2',aspeed,0,'anim2('+(num+1)+')')

       }else endanim(0)

}

/***************************************************************************

Intro 3

****************************************************************************/

xPath3=new Array(0,-2,-6,-13,-23,-36,-50,-66,-83,-100,-117,-134,-150,-164,-177,-187,-194,-198,-200,-198,-194,-187,-177,-164,-150,-134,-117,-100,-83,-66,-50,-36,-23,-13,-6,-2,0)

yPath3=new Array(0,-17,-34,-50,-64,-77,-87,-94,-98,-100,-98,-94,-87,-77,-64,-50,-34,-17,0,17,34,50,64,77,87,94,98,100,98,94,87,77,64,50,34,17,0)

function anim3(num){

       if(num<oZdivs.length){

              animX(num,'xPath3','yPath3',aspeed,0,'anim3('+(num+1)+')')

       }else endanim(0)

}

/***************************************************************************

Animation function

****************************************************************************/

function animX(divnum,arrayX,arrayY,speed,num,fn){

       arrayXr = new Array(); arrayYr = new Array()

       arrayXr = eval(arrayX); arrayYr = eval(arrayY)

       arrayX = "'"+arrayX+"'"; arrayY = "'"+arrayY+"'"

       if(num<arrayXr.length){

           oZdivs[divnum].moveIt(arrayXr[num]+(pageXcenter+xpos[divnum]),arrayYr[num]+(pageYcenter+ypos))

              num++;

              setTimeout("animX("+divnum+","+arrayX+","+arrayY+","+speed+","+num+",'"+fn+"')",speed)

       }else eval(fn)

}

/***************************************************************************

This is what happens when the animation is over. If

you want something else to happen edit here!

****************************************************************************/

function endanim(num){

       if(num<oZdivs.length){

              oZdivs[num].css.visibility='hidden' //Hiding divs

              num++

              setTimeout("endanim("+num+")",300)

       }else{

              //location.href="main2.html" //Going to another page

       }

}

 

/***************************************************************************

Starting the intro when the page is loaded.

****************************************************************************/

 

onload=introInit;

</script>

 

<div id="div0" class="clDivs">J</div>

<div id="div1" class="clDivs">a</div>

<div id="div2" class="clDivs">v</div>

<div id="div3" class="clDivs">a</div>

<div id="div4" class="clDivs">S</div>

<div id="div5" class="clDivs">c</div>

<div id="div6" class="clDivs">r</div>

<div id="div7" class="clDivs">i</div>

<div id="div8" class="clDivs">p</div>

<div id="div9" class="clDivs">t</div>

<div id="div10" class="clDivs">!</div>

 

0 Comments

Thu

26

Feb

2009

135、多页面文字显示

135、多页面文字显示

脚本说明:

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

<style type="text/css">

#divControl{position:absolute; width:250; font-family:arial; left:120; top:190; font-size:10pt; visibility:hidden}

#divCont{position:absolute; top:250; left:120; clip:rect(0,250,150,0); height:150; width:250}

.clScroll{position:absolute; top:0; font-size:10pt; left:0; font-family:arial; visibility:hidden}

</style>

<script language="JavaScript" type="text/javascript">

function lib_bwcheck(){ //Browsercheck (needed)

       this.ver=navigator.appVersion

       this.agent=navigator.userAgent

       this.dom=document.getElementById?1:0

       this.opera5=this.agent.indexOf("Opera 5")>-1

       this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;

       this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;

       this.ie4=(document.all && !this.dom && !this.opera5)?1:0;

       this.ie=this.ie4||this.ie5||this.ie6

       this.mac=this.agent.indexOf("Mac")>-1

       this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;

       this.ns4=(document.layers && !this.dom)?1:0;

       this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)

       return this

}

var bw=new lib_bwcheck()

 

 

/*********************************************************************************

These are the variables you have to set:

*********************************************************************************/

 

 

//The speed of the timeout between each scroll.

timSpeed=50

 

//The height of the container (change this when it scrolls to much or to little)

contHeight=100

 

/*********************************************************************************

This is the object constructor function, which applies

methods and properties to the Cross-browser layer object

*********************************************************************************/

function makeScrollObj(obj,nest){

       nest=(!nest) ? "":'document.'+nest+'.'           

       this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;

      this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;             

       this.height=bw.ns4?this.css.document.height:this.el.offsetHeight

       this.top=b_gettop                                                                 

       return this

}

//Getting the top for the top method

function b_gettop(){

       var gleft=(bw.ns4 || bw.ns6)?parseInt(this.css.top):eval(this.css.pixelTop);

       return gleft;

}

//Variables

var scrollTim=1;

var active=0;

/*********************************************************************************

The scroll function. Checks what way to scroll and checks if the

layer is not already on top or bottom.

*********************************************************************************/

function scroll(speed){

       clearTimeout(scrollTim)

       way=speed>0?1:0

       if((!way && oScroll[active].top()>-oScroll[active].height+contHeight) || (oScroll[active].top()<0 && way)){

              oScroll[active].css.top=oScroll[active].top()+speed

              scrollTim=setTimeout("scroll("+speed+")",timSpeed)

       }

}

//Clears the timeout so the scroll stops, this is called onmouseout.

function noScroll(){

       clearTimeout(scrollTim)

}

/*********************************************************************************

Changes the active layer. Hides the one that's visible and

shows the "new" one. Also set's the new layers top to

0 so it starts at top.

*********************************************************************************/

function changeActive(num){

       oScroll[active].css.visibility='hidden'

       active=num

       oScroll[active].css.top=0

       oScroll[active].css.visibility='visible'

}

/*********************************************************************************

Initilizes the page, makes a oScroll Array and calls the object constructor.

Here you can add as many scrollObjects as you want

*********************************************************************************/

function scrollInit(){

       oScroll=new Array()

       oScroll[0]=new      makeScrollObj('divScroll1','divCont')

       oScroll[1]=new      makeScrollObj('divScroll2','divCont')

       oScroll[2]=new      makeScrollObj('divScroll3','divCont')

       oScroll[3]=new      makeScrollObj('divScroll4','divCont')

       oScroll[0].css.visibility='visible'

       oControl=new makeScrollObj('divControl')

       oControl.css.visibility='visible'

}

/*********************************************************************************

Executes the scrollInit function on pageload.

*********************************************************************************/

onload=scrollInit;

</script>

<div id="divControl">

       <a href="#" onclick="changeActive(0)">Page 1</a>

       <a href="#" onclick="changeActive(1)">Page 2</a>

       <a href="#" onclick="changeActive(2)">Page 3</a>

       <a href="#" onclick="changeActive(3)">Page 4</a>

       <br><br>

       <a href="#" onmouseover="scroll(5)" onmouseout="noScroll()">up</a>

       <a href="#" onmouseover="scroll(-5)" onmouseout="noScroll()">down</a>

</div>

<div id="divCont">

       <div id="divScroll1" class="clScroll">

              This is "page" 1, here you place some content.

              You should place more content then this

              or it won't scroll..blablablabl<br>

              <br>text text dummy texttext text dummy texttext text dummy text<br>

              <br>text text dummy text text text dummy text text text dummy text <br>

       </div>

      

       <div id="divScroll2" class="clScroll">

              This is "page" 2...........

              <br>text textdummy texttext text dummy texttext text dummy text<br>

              <br>text text dummy text text text dummy text text text dummy text <br>

              text text dummy texttext text dummy texttext text dummy text<br>

              <br>text text dummy text text text dummy text text text dummy text <br>

              <br>text textdummy texttext text dummy texttext text dummy text<br>

              <br>text text dummy text text text dummy text text text dummy text <br>

              text text dummy texttext text dummy texttext text dummy text<br>

              <br>text text dummy text text text dummy text text text dummy text <br>

       </div>

 

       <div id="divScroll3" class="clScroll">

              This is "page" 3...........(can't scroll this one, to little content)

              <br>

       </div>

 

       <div id="divScroll4" class="clScroll">

              Page 4

              text text dummy texttext text dummy texttext text dummy text<br>

              <br>ext text dummy texttext text dummy texttext text dummy text<br>

              <br>text text dummy texttext text dummy texttext text dummy text<br>

              <br>text text dummy texttext text dummy texttext text dummy text<br>

              <br>text text dummy texttext text dummy texttext text dummy text<br>

       </div>

</div>

 

 

0 Comments

Thu

26

Feb

2009

134、大量文字的分段显示

134、大量文字的分段显示

<STYLE type=text/css>A {

       FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: verdana,arial,helvetica,sans-serif; TEXT-DECORATION: none

}

A:hover {

       COLOR: #cccccc; TEXT-DECORATION: underline

}

BODY {

       BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 11px; OVERFLOW: hidden; COLOR: #999999; LINE-HEIGHT: 130%; FONT-FAMILY: verdana,arial,helvetica,sans-serif;  BORDER-RIGHT-WIDTH: 0px

}

#divScroller1 {

       BORDER-RIGHT: #666666 0px dashed; BORDER-TOP: #666666 0px dashed; Z-INDEX: 9; LEFT: 100px; OVERFLOW: hidden; BORDER-LEFT: #666666 1px dashed; WIDTH: 400px; CLIP: rect(0px 400px 300px 0px); BORDER-BOTTOM: #666666 0px dashed; POSITION: absolute; TOP: 90px; HEIGHT: 300px; visbility: visible

}

.dynPage {

       PADDING-LEFT: 15px; FONT-SIZE: 10px; Z-INDEX: 10; LEFT: 0px; VISIBILITY: hidden; WIDTH: 400px; COLOR: black; FONT-FAMILY: arial,helvetica,sans-serif; POSITION: absolute; TOP: 0px

}

#arrows {

       Z-INDEX: 11; LEFT: 74px; WIDTH: 20px; POSITION: absolute; TOP: 355px

}

#links {

       Z-INDEX: 11; LEFT: 77px; WIDTH: 20px; POSITION: absolute; TOP: 301px

}

</STYLE>

<html>

<head>

<title>大量文字的分段显示</title>

<style type="text/css">

<!--

body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}

A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }

 A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }

a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }

 

-->

</style>

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

</head>

 

<body bgcolor="#fef4d9">

<center><font color=red face="隶书" size=6>大量文字的分段显示</font></center>

<SCRIPT language=JavaScript type=text/javascript>

function lib_bwcheck(){ //Browsercheck (needed)

       this.ver=navigator.appVersion

       this.agent=navigator.userAgent

       this.dom=document.getElementById?1:0

       this.opera5=this.agent.indexOf("Opera 5")>-1

       this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;

       this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;

       this.ie4=(document.all && !this.dom && !this.opera5)?1:0;

       this.ie=this.ie4||this.ie5||this.ie6

       this.mac=this.agent.indexOf("Mac")>-1

       this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;

       this.ns4=(document.layers && !this.dom)?1:0;

       this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)

       return this

}

var bw=new lib_bwcheck()

 

 

/*** variables to configure... ***/

 

var numScrollPages = 3         //Set the number of pages (layers) here.

var transitionOut = 1;         //The 'out' effect... 0= no effect, 1= fade

var transitionIn = 2;          //The 'in' effect... 0= no effect, 1= fade, 2= slide

var slideAcceleration = 0.2;   //If you use the slide animation, set this somewhere between 0 and 1.

 

/*** Please note that there are no effects available in ns4 and ie4, or explorers on the Mac! ***/

 

 

if(document.layers){ //NS4 resize fix...

       scrX= innerWidth; scrY= innerHeight;

       onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }

}

 

//object constructor...

function scrollerobj(obj,nest){

       nest = (!nest)?"":'document.'+nest+'.'

       this.elm = bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):document.getElementById(obj)

       this.css = bw.ns4?this.elm:this.elm.style

       this.doc = bw.ns4?this.elm.document:document

       this.obj = obj+'scrollerobj'; eval(this.obj+'=this')

       this.x = (bw.ns4||bw.opera5)?this.css.left:this.elm.offsetLeft

       this.y = (bw.ns4||bw.opera5)?this.css.top:this.elm.offsetTop

       this.w = (bw.ie4||bw.ie5||bw.ie6||bw.ns6)?this.elm.offsetWidth:bw.ns4?this.elm.clip.width:bw.opera5?this.css.pixelWidth:0

       this.h = (bw.ie4||bw.ie5||bw.ie6||bw.ns6)?this.elm.offsetHeight:bw.ns4?this.elm.clip.height:bw.opera5?this.css.pixelHeight:0

}

 

//object methods...

scrollerobj.prototype.moveTo = function(x,y){

       if(x!=null){this.x=x; this.css.left=x}

       if(y!=null){this.y=y; this.css.top=y}

}

scrollerobj.prototype.moveBy = function(x,y){this.moveTo(this.x+x,this.y+y)}

scrollerobj.prototype.hideIt = function(){this.css.visibility='hidden'}

scrollerobj.prototype.showIt = function(){this.css.visibility='visible'}

 

/****************************************************************

scroll functions...

****************************************************************/

var scrollTimer = null;

function scroll(step){

       clearTimeout(scrollTimer);

       if ( !busy && (step<0&&activePage.y+activePage.h>scroller1.h || step>0&&activePage.y<0) ){

              activePage.moveBy(0,step);

              scrollTimer = setTimeout('scroll('+step+')',40);

       }

}

function stopScroll(){

       clearTimeout(scrollTimer);

}

 

/****************************************************************

activating the correct layers...

****************************************************************/

var activePage = null;

var busy = 0;

function activate(num){

       if (activePage!=pages[num] && !busy){

              busy = 1;

              if (transitionOut==0 || !bw.opacity){ activePage.hideIt(); activateContinue(num); }

              else if (transitionOut==1) activePage.blend('hidden', 'activateContinue('+num+')');

       }

}

function activateContinue(num){

       busy = 1;

       activePage = pages[num];

       activePage.moveTo(0,0);

       if (transitionIn==0 || !bw.opacity){ activePage.showIt(); busy=0; }

       else if (transitionIn==1) activePage.blend('visible', 'busy=0');

       else if (transitionIn==2) activePage.slide(0, slideAcceleration, 40, 'busy=0');

}

 

 

/****************************************************************

Slide methods...

****************************************************************/

scrollerobj.prototype.slide = function(target, acceleration, time, fn){

       this.slideFn= fn?fn:null;

       this.moveTo(0,scroller1.h);

       if (bw.ie4&&!bw.mac) this.css.filter = 'alpha(opacity=100)';

       if (bw.ns6) this.css.MozOpacity = 1;

       this.showIt();

       this.doSlide(target, acceleration, time);

}

scrollerobj.prototype.doSlide = function(target, acceleration, time){

       this.step = Math.round(this.y*acceleration);

       if (this.step<1) this.step = 1;

       if (this.step>this.y) this.step = this.y;

       this.moveBy(0, -this.step);

       if (this.y>0) this.slideTim = setTimeout(this.obj+'.doSlide('+target+','+acceleration+','+time+')', time);

       else {     

              eval(this.slideFn);

              this.slideFn = null;

       }

}

 

 

/****************************************************************

Opacity methods...

****************************************************************/

scrollerobj.prototype.blend= function(vis, fn){

       if (bw.ie5||bw.ie6 && !bw.mac) {

              if (vis=='visible') this.css.filter= 'blendTrans(duration=0.9)';

              else this.css.filter= 'blendTrans(duration=0.6)';

              this.elm.onfilterchange = function(){ eval(fn); };

              this.elm.filters.blendTrans.apply();

              this.css.visibility= vis;

              this.elm.filters.blendTrans.play();

       }

       else if (bw.ns6 || bw.ie&&!bw.mac){

              this.css.visibility= 'visible';

              vis=='visible' ? this.fadeTo(100, 7, 40, fn) : this.fadeTo(0, 9, 40, fn);

       }

       else {

              this.css.visibility= vis;

              eval(fn);

       }

};

 

scrollerobj.prototype.op= 100;

scrollerobj.prototype.opacityTim= null;

scrollerobj.prototype.setOpacity= function(num){

       this.css.filter= 'alpha(opacity='+num+')';

       this.css.MozOpacity= num/100;

       this.op= num;

}

scrollerobj.prototype.fadeTo= function(target, step, time, fn){

       clearTimeout(this.opacityTim);

       this.opacityFn= fn?fn:null;

       this.op = target==100 ? 0 : 100;

       this.fade(target, step, time);

}

scrollerobj.prototype.fade= function(target, step, time){

       if (Math.abs(target-this.op)>step){

              target>this.op? this.setOpacity(this.op+step):this.setOpacity(this.op-step);

              this.opacityTim= setTimeout(this.obj+'.fade('+target+','+step+','+time+')', time);

       }

       else {

              this.setOpacity(target);

              eval(this.opacityFn);

              this.opacityFn= null;

       }

}

 

 

/**************************************************************

Init function...

**************************************************************/

var pageslidefadeLoaded = 0;

function initPageSlideFade(){

       scroller1 = new scrollerobj('divScroller1');

      

       pages = new Array();

       pages[0] = null;

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

              pages[i] = new scrollerobj('dynPage'+i, 'divScroller1');

              pages[i].moveTo(0,0);

       }

       bw.opacity = ( bw.ie && !bw.ie4 && navigator.userAgent.indexOf('Windows')>-1 ) || bw.ns6

       if (bw.ie5||bw.ie6 && !bw.mac) pages[1].css.filter= 'blendTrans(duration=0.6)'; // Loads the windows 9.x filters module.

       activateContinue(1);

 

       if (bw.ie) for(var i=0;i<document.links.length;i++) document.links[i].onfocus=document.links[i].blur;

       pageslidefadeLoaded = 1;

}

//if the browser is ok, the script is started onload..

if(bw.bw && !pageslidefadeLoaded) onload = initPageSlideFade;

</SCRIPT>

<DIV id=divScroller1>

<DIV class=dynPage id=dynPage1>The Cask of Amontillado<BR><BR>by Edgar Allan

Poe<BR><BR>...<BR><BR>The thousand injuries of Fortunato I had borne as I best

could, but when he ventured upon insult, I vowed revenge. You, who so well know

the nature of my soul, will not suppose, however, that I gave utterance to a

threat. At length I would be avenged; this was a point definitely settled--but

the very definitiveness with which it was resolved, precluded the idea of risk.

I must not only punish, but punish with impunity. A wrong is unredressed when

retribution overtakes its redresser. It is equally unredressed when the avenger

fails to make himself felt as such to him who has done the wrong.<BR><BR>It must

be understood that neither by word nor deed had I given Fortunato cause to doubt

my good will. I continued, as was my wont, to smile in his face, and he did not

perceive that my smile now was at the thought of his immolation.<BR><BR>He had a

weak point--this Fortunato--although in other regards he was a man to be

respected and even feared. He prided himself on his connoisseurship in wine. Few

Italians have the true virtuoso spirit. For the most part their enthusiasm is

adopted to suit the time and opportunity-- to practise imposture upon the

British and Austrian millionaires. In painting and gemmary, Fortunato, like his

countrymen, was a quack-- but in the matter of old wines he was sincere. In this

respect I did not differ from him materially: I was skillful in the Italian

vintages myself, and bought largely whenever I could.<BR><BR>It was about dusk,

one evening during the supreme madness of the carnival season, that I

encountered my friend. He accosted me with excessive warmth, for he had been

drinking much. The man wore motley. He had on a tight-fitting parti-striped

dress, and his head was surmounted by the conical cap and bells. I was so

pleased to see him, that I thought I should never have done wringing his

hand.<BR><BR>I said to him--"My dear Fortunato, you are luckily met. How

remarkably well you are looking to-day! But I have received a pipe of what

passes for Amontillado, and I have my doubts."<BR><BR>"How?" said he.

"Amontillado? A pipe? Impossible! And in the middle of the carnival!"<BR><BR>"I

have my doubts," I replied; "and I was silly enough to pay the full Amontillado

price without consulting you in the matter. You were not to be found, and I was

fearful of losing a bargain."<BR><BR>"Amontillado!"<BR><BR>"I have my

doubts."<BR><BR>"Amontillado!"<BR><BR>"And I must satisfy

them."<BR><BR>"Amontillado!"<BR><BR>"As you are engaged, I am on my way to

Luchesi. If any one has a critical turn, it is he. He will tell

me--"<BR><BR>"Luchesi cannot tell Amontillado from Sherry."<BR><BR>"And yet some

fools will have it that his taste is a match for your own."<BR><BR>"Come, let us

go."<BR><BR>"Whither?"<BR><BR>"To your vaults."<BR><BR>"My friend, no; I will

not impose upon your good nature. I perceive you have an engagement.

Luchesi--"<BR><BR>"I have no engagement;--come."<BR><BR>"My friend, no. It is

not the engagement, but the severe cold with which I perceive you are afflicted.

The vaults are insufferably damp. They are encrusted with nitre."<BR><BR>"Let us

go, nevertheless. The cold is merely nothing. Amontillado! You have been imposed

upon. And as for Luchesi, he cannot distinguish Sherry from

Amontillado."<BR><BR>Thus speaking, Fortunato possessed himself of my arm.

Putting on a mask of black silk, and drawing a roquelaire closely about my

person, I suffered him to hurry me to my palazzo.<BR><BR>There were no

attendants at home; they had absconded to make merry in honour of the time. I

had told them that I should not return until the morning, and had given them

explicit orders not to stir from the house. These orders were sufficient, I well

knew, to insure their immediate disappearance, one and all, as soon as my back

was turned.<BR><BR>I took from their sconces two flambeaux, and giving one to

Fortunato, bowed him through several suites of rooms to the archway that led

into the vaults. I passed down a long and winding staircase, requesting him to

be cautious as he followed. We came at length to the foot of the descent, and

stood together on the damp ground of the catacombs of the Montresors.<BR><BR>The

gait of my friend was unsteady, and the bells upon his cap jingled as he

strode.<BR><BR>"The pipe," said he.<BR><BR>"It is farther on," said I; "but

observe the white web-work which gleams from these cavern walls."<BR><BR>He

turned towards me, and looked into my eyes with two filmy orbs that distilled

the rheum of intoxication.<BR><BR>"Nitre?" he asked, at length.<BR><BR>"Nitre,"

I replied. "How long have you had that cough?"<BR><BR>"Ugh! ugh! ugh!--ugh! ugh!

ugh!--ugh! ugh! ugh!--ugh! ugh! ugh!--ugh! ugh! ugh!"<BR><BR>My poor friend

found it impossible to reply for many minutes.<BR><BR>"It is nothing," he said,

at last.<BR><BR>"Come," I said, with decision, "we will go back; your health is

precious. You are rich, respected, admired, beloved; you are happy, as once I

was. You are a man to be missed. For me it is no matter. We will go back; you

will be ill, and I cannot be responsible. Besides, there is

Luchesi--"<BR><BR>"Enough," he said; "the cough is a mere nothing; it will not

kill me. I shall not die of a cough."<BR><BR>"True--true," I replied; "and,

indeed, I had no intention of alarming you unnecessarily--but you should use all

proper caution. A draught of this Medoc will defend us from the

damps."<BR><BR>Here I knocked off the neck of a bottle which I drew from a long

row of its fellows that lay upon the mould.<BR><BR>"Drink," I said, presenting

him the wine.<BR><BR>He raised it to his lips with a leer. He paused and nodded

to me familiarly, while his bells jingled.<BR><BR>"I drink," he said, "to the

buried that repose around us."<BR><BR>"And I to your long life."<BR><BR>He again

took my arm, and we proceeded.<BR><BR>"These vaults," he said, "are

extensive."<BR><BR>"The Montresors," I replied, "were a great and numerous

family."<BR><BR>"I forget your arms."<BR><BR>"A huge human foot d'or, in a field

azure; the foot crushes a serpent rampant whose fangs are imbedded in the

heel."<BR><BR>"And the motto?"<BR><BR>" Nemo me impune lacessit."<BR><BR>"Good!"

he said.<BR></DIV>

<DIV class=dynPage id=dynPage2>The wine sparkled in his eyes and the bells

jingled. My own fancy grew warm with the Medoc. We had passed through walls of

piled bones, with casks and puncheons intermingling, into the inmost recesses of

catacombs. I paused again, and this time I made bold to seize Fortunato by an

arm above the elbow.<BR><BR>"The nitre!" I said; "see, it increases. It hangs

like moss upon the vaults. We are below the river's bed. The drops of moisture

trickle among the bones. Come, we will go back ere it is too late. Your

cough--"<BR><BR>"It is nothing," he said; "let us go on. But first, another

draught of the Medoc."<BR><BR>I broke and reached him a flagon of De Grave. He

emptied it at a breath. His eyes flashed with a fierce light. He laughed and

threw the bottle upwards with a gesticulation I did not understand.<BR><BR>I

looked at him in surprise. He repeated the movement--a grotesque

one.<BR><BR>"You do not comprehend?" he said.<BR><BR>"Not I," I

replied.<BR><BR>"Then you are not of the brotherhood."<BR><BR>"How?"<BR><BR>"You

are not of the masons."<BR><BR>"Yes, yes," I said; "yes, yes."<BR><BR>"You?

Impossible! A mason?"<BR><BR>"A mason," I replied.<BR><BR>"A sign," he said, "a

sign."<BR><BR>"It is this," I answered, producing a trowel from beneath the

folds of my roquelaire.<BR><BR>"You jest," he exclaimed, recoiling a few paces.

"But let us proceed to the Amontillado."<BR><BR>"Be it so," I said, replacing

the tool beneath the cloak and again offering him my arm. He leaned upon it

heavily. We continued our route in search of the Amontillado. We passed through

a range of low arches, descended, passed on, and descending again, arrived at a

deep crypt, in which the foulness of the air caused our flambeaux rather to glow

than flame.<BR><BR>At the most remote end of the crypt there appeared another

less spacious. Its walls had been lined with human remains, piled to the vault

overhead, in the fashion of the great catacombs of Paris. Three sides of this

interior crypt were still ornamented in this manner. From the fourth side the

bones had been thrown down, and lay promiscuously upon the earth, forming at one

point a mound of some size. Within the wall thus exposed by the displacing of

the bones, we perceived a still interior recess, in depth about four feet in

width three, in height six or seven. It seemed to have been constructed for no

especial use within itself, but formed merely the interval between two of the

colossal supports of the roof of the catacombs, and was backed by one of their

circumscribing walls of solid granite.<BR><BR>It was in vain that Fortunato,

uplifting his dull torch, endeavoured to pry into the depth of the recess. Its

termination the feeble light did not enable us to see.<BR><BR>"Proceed," I said;

"herein is the Amontillado. As for Luchesi--"<BR><BR>"He is an ignoramus,"

interrupted my friend, as he stepped unsteadily forward, while I followed

immediately at his heels. In an instant he had reached the extremity of the

niche, and finding his progress arrested by the rock, stood stupidly bewildered.

A moment more and I had fettered him to the granite. In its surface were two

iron staples, distant from each other about two feet, horizontally. From one of

these depended a short chain, from the other a padlock. Throwing the links about

his waist, it was but the work of a few seconds to secure it. He was too much

astounded to resist. Withdrawing the key I stepped back from the

recess.<BR><BR>"Pass your hand," I said, "over the wall; you cannot help feeling

the nitre. Indeed, it is very damp. Once more let me implore you to return. No?

Then I must positively leave you. But I must first render you all the little

attentions in my power."<BR><BR>"The Amontillado!" ejaculated my friend, not yet

recovered from his astonishment.<BR><BR>"True," I replied; "the

Amontillado."<BR><BR>As I said these words I busied myself among the pile of

bones of which I have before spoken. Throwing them aside, I soon un- covered a

quantity of building stone and mortar. With these materials and with the aid of

my trowel, I began vigorously to wall up the entrance of the niche.<BR><BR>I had

scarcely laid the first tier of the masonry when I discovered that the

intoxication of Fortunato had in a great measure worn off. The earliest

indication I had of this was a low moaning cry from the depth of the recess. It

was not the cry of a drunken man. There was then a long and obstinate silence. I

laid the second tier, and the third, and the fourth; and then I heard the

furious vibrations of the chain. The noise lasted for several minutes, during

which, that I might hearken to it with the more satisfaction, I ceased my

labours and sat down upon the bones. When at last the clanking subsided, I

resumed the trowel, and finished without interruption the fifth, the sixth, and

the seventh tier. The wall was now nearly upon a level with my breast. I again

paused, and holding the flambeaux over the mason-work, threw a few feeble rays

upon the figure within.<BR><BR>A succession of loud and shrill screams, bursting

suddenly from the throat of the chained form, seemed to thrust me violently

back. For a brief moment I hesitated-- I trembled. Unsheathing my rapier, I

began to grope with it about the recess; but the thought of an instant reassured

me. I placed my hand upon the solid fabric of the catacombs, and felt satisfied.

I reapproached the wall; I replied to the yells of him who clamoured. I

re-echoed-- I aided-- I surpassed them in volume and in strength. I did this,

and the clamourer grew still.<BR><BR>It was now midnight, and my task was

drawing to a close. I had completed the eighth, the ninth, and the tenth tier. I

had finished a portion of the last and the eleventh; there remained but a single

stone to be fitted and plastered in. I struggled with its weight; I placed it

partially in its destined position. But now there came from out the niche a low

laugh that erected the hairs upon my head. It was succeeded by a sad voice,

which I had difficulty in recognizing as that of the noble Fortunato. The voice

said--<BR><BR>"Ha! ha! ha!--he! he! he!--a very good joke indeed--an excellent

jest. We shall have many a rich laugh about it at the palazzo--he! he! he!--over

our wine--he! he! he!"<BR><BR>"The Amontillado!" I said.<BR><BR>"He! he!

he!--he! he! he!--yes, the Amontillado. But is it not getting late? Will not

they be awaiting us at the palazzo, the Lady Fortunato and the rest? Let us be

gone."<BR><BR>"Yes," I said, "let us be gone."<BR><BR>" For the love of God,

Montresor!"<BR><BR>"Yes," I said, "for the love of God!"<BR><BR>But to these

words I hearkened in vain for a reply. I grew impatient. I called

aloud--<BR><BR>"Fortunato!"<BR><BR>No answer. I called

again--<BR><BR>"Fortunato--"<BR><BR>No answer still. I thrust a torch through

the remaining aperture and let it fall within. There came forth in reply only a

jingling of the bells. My heart grew sick on account of the dampness of the

catacombs. I hastened to make an end of my labour. I forced the last stone into

its position; I plastered it up. Against the new masonry I re-erected the old

rampart of bones. For the half of a century no mortal has disturbed them. In

pace requiescat!<BR></DIV>

<DIV class=dynPage id=dynPage3>Content, content content content content content

content <BR><BR><BR><A onfocus=if(this.blur)this.blur()

onclick="transitionIn=transitionIn==2?1:2; return false;"

href="#">switch

transitions</A> </DIV></DIV>

<DIV id=arrows><A onmouseover=scroll(7); onclick="return false;"

onmouseout=stopScroll();

href="#"><IMG height=17

alt="" src="arrows_rounded_up.gif" width=20 border=0></A> <A

onmouseover=scroll(-7); onclick="return false;" onmouseout=stopScroll();

href="#"><IMG height=17

alt="" src="arrows_rounded_down.gif" width=20 border=0></A> </DIV>

<DIV id=links><A onfocus=if(this.blur)this.blur()

onclick="activate(1); return false;"

href="#">I</A><BR><A

onfocus=if(this.blur)this.blur() onclick="activate(2); return false;"

href="#">II</A><BR><A

onfocus=if(this.blur)this.blur() onclick="activate(3); return false;"

href="#">III</A><BR></DIV></BODY></HTML>

 

 

0 Comments

Thu

26

Feb

2009

133、多变的动态文字

133、多变的动态文字

脚本说明:

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

<script language="JavaScript1.2">

 

var size = 25;

var speed_between_messages=1500  //in miliseconds

 

 

var tekst = new Array()

{

tekst[0] = "Welcome to first script site";

tekst[1] = "你喜欢各种各样的javascript程序?";

tekst[2] = "还有多变的精彩的Flash";

tekst[3] = "你一定会非常喜欢的,谢谢";

}

var klaar = 0;

var s = 0;

var veran =0;

var tel = 0;

function bereken(i,Lengte)

{

return (size*Math.abs( Math.sin(i/(Lengte/3.14))) );

}

 

function motor(p)

{

var output = "";

for(w = 0;w < tekst[s].length - klaar+1; w++)

{

q = bereken(w/2 + p,16);

if (q > size - 0.5)

{klaar++;}

if (q < 5)

{tel++;

if (tel > 1)

{

tel = 0;

if (veran == 1)

{

veran = 0;

s++;

if ( s == tekst.length)

{s = 0;}

p = 0;

if (window.loop)

{clearInterval(loop)}

loop = motor();

}

}

}

output += "<font style='font-size: "+ q +"pt'>" +tekst[s].substring(w,w+1)+ "</font>";  

}

for(k=w;k<klaar+w;k++)

{

output += "<font style='font-size: " + size + "pt'>" +tekst[s].substring(k,k+1)+ "</font>";

}

idee.innerHTML = output;    

}

 

function startmotor(p){

if (!document.all)

return

var loop = motor(p);

if (window.time)

{clearInterval(time)}

if (klaar == tekst[s].length)

{

klaar = 0;

veran = 1;

tel = 0;

var time = setTimeout("startmotor(" +(p+1) + ")", speed_between_messages);

}else

{    

var time =setTimeout("startmotor(" +(p+1) + ")", 50);

}

 

}

 

</script>

<div ID="idee"></div>

 

 

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

<body onload="startmotor(0)">

 

0 Comments

Thu

26

Feb

2009

132、精彩的变色文字

132、精彩的变色文字

脚本说明:

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

<style>

.F1 {filter: glow(Color=#FF8000,Strength=10);

     width=200px;

     height=200px;}

.F2 {filter: glow(Color=#00FF00,Strength=9);

     width=150px;

     height=200px;}

.F3 {filter: glow(Color=#0080FF,Strength=12);

     width=250px;

     height=200px;}

</style>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var rate = 1000

// do not edit below this line

var i = 0;

var F = 'F1';

function doThing() {

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

ok = true;

i++;

if (i==1) F = 'F1';

if (i==2) F = 'F2';

if (i==3) F = 'F3';

YammaYamma.className = F;

if (i > 2) i = 0;

timer = setTimeout('doThing()', rate);

   }        

}

//  End -->

</script>

<span id="YammaYamma">

<b>I love javascript very much----7stk.com</b>

</span>

 

 

 

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

<body onLoad="doThing()">

 

0 Comments

Thu

26

Feb

2009

131、文字一个个跳动

131、文字一个个跳动

脚本说明:

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

<SCRIPT language=JavaScript>

var r=0

       var a=11,b=9,c=7,d=10,e=11,f=8;

      var y2=-25,y1=-25,y3=-25,y4=-25,y5=-25,y6=-25;

       var x1=305,x2=335,x3=365,x4=395,x5=425,x6=455;

function setVariables(){

         if (navigator.appName == "Netscape") {

                           horz=".left";

                            vert=".top";

                            visShow="'show'";

                            visHide="'hide'";

                            docStyle="document.";

                            styleDoc="";

 }else{

                           horz=".pixelLeft";

                            vert=".pixelTop";

                            visHide="'hidden'";

                            visShow="'visible'";

                            docStyle="";

                            styleDoc=".style";

 

              }

 

      }

 

 

function startbounce1(){

objectX1="object1"

y1 += a

evalMove1()

if (y1<210) setTimeout("startbounce1()",20)

else bounce1()

}

function bounce1(){

if (y1>201) a=11-r,r=Math.random()*100/25,Math.round(r);

y1 -= a

if (y1<100) a -= .5

evalMove1()

if (y1>-100) setTimeout("bounce1()",10)

else toggle()

}

 

function startbounce2(){

objectX2="object2"

y2 += b

evalMove2()

if (y2<210) setTimeout("startbounce2()",20)

else bounce2()

}

function bounce2(){

if (y2>201) b=8+r

y2 -= b

if (y2<100) b -= .5

evalMove2()

if (y2>-100) setTimeout("bounce2()",20)

else toggle()

}

 

function startbounce3(){

objectX3="object3"

y3 += c

evalMove3()

if (y3<210) setTimeout("startbounce3()",20)

else bounce3()

}

function bounce3(){

if (y3>201) c=7+r

y3 -= c

if (y3<100) c -= .5

evalMove3()

if (y3>-100) setTimeout("bounce3()",10)

else toggle()

}

 

function startbounce4(){

objectX4="object4"

y4 += d

evalMove4()

if (y4<210) setTimeout("startbounce4()",20)

else bounce4()

}

function bounce4(){

if (y4>201) d=8+r

y4 -= d

if (y4<100) d -= .5

evalMove4()

if (y4>-100) setTimeout("bounce4()",20)

else toggle()

}

 

function startbounce5(){

objectX5="object5"

y5 += e

evalMove5()

if (y5<210) setTimeout("startbounce5()",10)

else bounce5()

}

function bounce5(){

if (y5>201) e=12-r

y5 -= e

if (y5<100) e -= .5

evalMove5()

if (y5>-100) setTimeout("bounce5()",20)

else toggle()

}

 

function startbounce6(){

objectX6="object6"

y6 += f

evalMove6()

if (y6<210) setTimeout("startbounce6()",10)

else bounce6()

}

function bounce6(){

if (y6>201) f=8+r

y6 -= f

if (y6<100) f -= .5

evalMove6()

if (y6>-100) setTimeout("bounce6()",10)

else toggle()

}

 

function evalMove6(){

        eval(docStyle + objectX6 + styleDoc + horz + '=' + x6);

        eval(docStyle + objectX6 + styleDoc + vert + "=" + y6);

}

 

 

function evalMove5(){

        eval(docStyle + objectX5 + styleDoc + horz + '=' + x5);

        eval(docStyle + objectX5 + styleDoc + vert + "=" + y5);

}

function evalMove4(){

        eval(docStyle + objectX4 + styleDoc + horz + '=' + x4);

        eval(docStyle + objectX4 + styleDoc + vert + "=" + y4);

}

 

function evalMove3(){

        eval(docStyle + objectX3 + styleDoc + horz + '=' + x3);

        eval(docStyle + objectX3 + styleDoc + vert + "=" + y3);

}

 

 

function evalMove2(){

        eval(docStyle + objectX2 + styleDoc + horz + '=' + x2);

        eval(docStyle + objectX2 + styleDoc + vert + "=" + y2);

}

function evalMove1(){

        eval(docStyle + objectX1 + styleDoc + horz + '=' + x1);

        eval(docStyle + objectX1 + styleDoc + vert + "=" + y1);

}

 

</SCRIPT>

<DIV id=object1 style="LEFT: 125px; POSITION: absolute; TOP: -50px; Z-INDEX: 2">

<CENTER>

<TABLE bgColor=#ffffff width=10>

  <TBODY>

  <TR>

    <TD><FONT color=#0080c0>

      <CENTER><B>J</B></CENTER></FONT></TD></TR></TBODY></TABLE></DIV>

<DIV id=object2 style="LEFT: 125px; POSITION: absolute; TOP: -50px; Z-INDEX: 2">

<TABLE bgColor=#ffffff width=10>

  <TBODY>

  <TR>

    <TD><FONT color=#0080c0>

      <CENTER><B>a</B></CENTER></FONT></TD></TR></TBODY></TABLE></DIV>

<DIV id=object3 style="LEFT: 185px; POSITION: absolute; TOP: -50px; Z-INDEX: 2">

<TABLE bgColor=#ffffff width=10>

  <TBODY>

  <TR>

    <TD><FONT color=#0080c0>

      <CENTER><B>v</B></CENTER></FONT></TD></TR></TBODY></TABLE></DIV>

<DIV id=object4 style="LEFT: 215px; POSITION: absolute; TOP: -50px; Z-INDEX: 2">

<TABLE bgColor=#ffffff width=10>

  <TBODY>

  <TR>

    <TD><FONT color=#0080c0>

      <CENTER><B>a</B></CENTER></FONT></TD></TR></TBODY></TABLE></DIV>

<DIV id=object5 style="LEFT: 245px; POSITION: absolute; TOP: -50px; Z-INDEX: 2">

<TABLE bgColor=#ffffff width=10>

  <TBODY>

  <TR>

    <TD><FONT color=#0080c0>

      <CENTER><B>s</B></CENTER></FONT></TD></TR></TBODY></TABLE></DIV>

         <DIV id=object6 style="LEFT: 243px; POSITION: absolute; TOP: -50px; Z-INDEX: 2">

<TABLE bgColor=#ffffff width=10>

  <TBODY>

  <TR>

    <TD><FONT color=#0080c0>

      <CENTER><B>c</B></CENTER></FONT></TD></TR></TBODY></TABLE></DIV>

<DIV id=line1

style="HEIGHT: 24px; LEFT: 27px; POSITION: absolute; TOP: 215px; WIDTH: 707px; Z-INDEX: 1">

<TABLE bgColor=#ffffff>

  <TBODY>

  <TR>

    <TD><FONT color=#0080c0>

      <CENTER><B>________________________</B></CENTER></FONT></TD></TR></TBODY></TABLE></DIV>

<DIV id=note

style="HEIGHT: 24px; LEFT: 31px; POSITION: absolute; TOP: 237px; WIDTH: 697px; Z-INDEX: 1">

<TABLE bgColor=#ffffff>

  <TBODY>

  <TR>

    <TD><FONT color=#000000><B>www.7stk.com</B></FONT></TD></TR></TBODY></TABLE></DIV>

 

 

 

 

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

<BODY bgcolor="#fef4d9"

onload=setVariables(),startbounce1(),startbounce2(),startbounce3(),startbounce4(),startbounce5(),startbounce6()>

 

0 Comments

Thu

26

Feb

2009

130、文字倒转反复

130、文字倒转反复

脚本说明:

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

<SCRIPT>

<!-- Beginning of JavaScript -

 

 

function flipVertical() {       

       if(document.all) {

              document.all.mainbody.style.filter="flipV()"

              var timer=setTimeout("flipHori()",3000)

       }

}

 

function flipHori() {            

              document.all.mainbody.style.filter="flipH()"

              var timer=setTimeout("flipRestore()",3000)

}

 

function flipRestore() {        

              history.go(0)

}

 

// - End of JavaScript - -->

</SCRIPT>

 

<DIV id=mainbody

style="HEIGHT: 200px; LEFT: 122px; POSITION: absolute; TOP: 80px; VISIBILITY: visible; WIDTH: 722px">

<TABLE cellPadding=7>

  <TBODY>

  <TR>

    <TD align=middle colSpan=3 height=100><B><A

      href="#"

      onmouseover=flipVertical()><FONT size=5>JavaScript--</FONT><FONT

      face=Verdana size=5>~</FONT><FONT size=5>本站有超过500种的javascript特效</FONT><FONT face=Verdana

      size=5>!</FONT></A></B></TD></TR>

  <TR>

    <TD vAlign=top width=220><FONT size=2>这些特效主要是来自国外的一些相关站点</FONT><FONT face=Verdana size=2>; </FONT><FONT

      size=2>每星期都有15种左右的特效与您见面</FONT><FONT face=Verdana size=2>, </FONT><FONT size=2>只要你经常光临,就一定会有收获的</FONT><FONT face=Verdana size=2>, </FONT><FONT size=2>JavaScript再次谢谢你的光临</FONT><FONT face=Verdana size=2>JavaScript网页制作特效</FONT><FONT size=2>本站有超过500种的javascript特效</FONT><FONT face=Verdana size=2>, </FONT><FONT size=2>每星期都有15种左右的特效与您见面</FONT><FONT

      face=Verdana size=2>......</FONT></TD>

    <TD vAlign=bottom><IMG border=0 src="054.gif"> </TD>

    <TD vAlign=top width=180><FONT size=2>每星期都有15种左右的特效与您见面</FONT><FONT face=Verdana

      size=2>, </FONT><FONT size=2>本站有超过500种的javascript特效</FONT><FONT face=Verdana size=2>,

      </FONT><FONT size=2>JavaScript再次谢谢你的光临</FONT><FONT face=Verdana size=2>每星期都有15种左右的特效与您见面</FONT><FONT size=2>JavaScript网页制作特效</FONT><FONT face=Verdana size=2>,

      </FONT><FONT size=2>只要你经常光临,就一定会有收获的</FONT><FONT face=Verdana size=2>JavaScript</FONT><FONT size=2>每星期都有15种左右的特效与您见面</FONT><FONT face=Verdana

  size=2>.......</FONT></TD></TR></TBODY></TABLE></DIV>

 

0 Comments

Thu

26

Feb

2009

129、天女散花

129、天女散花

脚本说明:

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

<SCRIPT>

function setVariables(){

if (navigator.appName == "Netscape") h=".left=", v=".top=",dS="document.",sD="";

 else       h=".pixelLeft=",v=".pixelTop=",dS="",sD=".style";}

var y = 200;

var x = 300;

var inc=0;

var X = 250;

var Y = 150;

function moveLetters() {

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

              objectX="object"+j

       eval(dS + objectX +sD + v + (Y + Math.cos((20*Math.sin(inc/20))+j*70)*y*(Math.sin(10+inc/10)+0.2)*Math.cos((inc + j*25)/10)));

       eval(dS + objectX + sD + h + (X + Math.sin((20*Math.sin(inc/20))+j*70)*x*(Math.sin(10+inc/10)+0.2)*Math.cos((inc + j*25)/10)));

}

inc+=.2;

setTimeout("moveLetters()", 1);

}

 

</SCRIPT>

<DIV id=object0

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff0000 size=+4></FONT> </DIV>

<DIV id=object1

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#0fff00 size=+4></FONT> </DIV>

<DIV id=object2

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff00ff size=+4></FONT> </DIV>

<DIV id=object3

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#0080ff size=+4></FONT> </DIV>

<DIV id=object4

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff8000 size=+4>J</FONT> </DIV>

<DIV id=object5

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#008000 size=+4>A</FONT> </DIV>

<DIV id=object6

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#8000ff size=+4>V</FONT> </DIV>

<DIV id=object7

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff0000 size=+4>A</FONT> </DIV>

<DIV id=object8

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#0fff00 size=+4>S</FONT> </DIV>

<DIV id=object9

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff00ff size=+4>C</FONT> </DIV>

<DIV id=object10

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#0080ff size=+4>R</FONT> </DIV>

<DIV id=object11

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff8000 size=+4>I</FONT> </DIV>

<DIV id=object12

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#008000 size=+4>P</FONT> </DIV>

<DIV id=object13

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#8000ff size=+4>T</FONT> </DIV>

<DIV id=object14

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff0000 size=+4></FONT> </DIV>

<DIV id=object15

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#0fff00 size=+4></FONT> </DIV>

<DIV id=object16

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff00ff size=+4></FONT> </DIV>

<DIV id=object17

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#0080ff size=+4></FONT> </DIV>

<DIV id=object18

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff8000 size=+4></FONT> </DIV>

<DIV id=object19

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#008000 size=+4></FONT> </DIV>

<DIV id=object20

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#8000ff size=+4></FONT> </DIV>

<DIV id=object21

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff0000 size=+4></FONT> </DIV>

<DIV id=object22

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#0fff00 size=+4></FONT> </DIV>

<DIV id=object23

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff00ff size=+4></FONT> </DIV>

<DIV id=object24

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#0080ff size=+4></FONT> </DIV>

<DIV id=object25

style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT

color=#ff8000 size=+4></FONT> </DIV>

 

 

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

<body onload=setVariables(),moveLetters()>

 

0 Comments

Thu

26

Feb

2009

128、一个个出现的文字

128、一个个出现的文字

脚本说明:

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

<script language="JavaScript1.2">

 

var it=0

function initialize(){

mytext=typing.innerText

var myheight=typing.offsetHeight

typing.innerText=''

document.all.typing.style.height=myheight

document.all.typing.style.visibility="visible"

typeit()

}

function typeit(){

typing.insertAdjacentText("beforeEnd",mytext.charAt(it))

if (it<mytext.length-1){

it++

setTimeout("typeit()",100)

}

else

return

}

if (document.all)

document.body.onload=initialize

</script>

 

<small><span id="typing" style="visibility:hidden" align="left">New sites will appear in this window, which you can surf while you play. If you completed the preferences survey (by clicking on the Customize Sites button above), you will see sites covering your favorite subjects!</span></small>

 

0 Comments

Thu

26

Feb

2009

127、重叠显示的文字

127、重叠显示的文字

脚本说明:

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

<script type="text/javascript">

<!--

       function Go(){return}

 

       var AgntUsr=navigator.userAgent.toLowerCase();

       var DomYes=(document.getElementById)?1:0;                        // DOM

       var NavYes=(AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')==-1)?1:0;     // Netscape

       var ExpYes=(AgntUsr.indexOf('msie')!=-1)?1:0;                       // IExplorer

       var Opr5=(AgntUsr.indexOf('opera 5')!=-1)?1:0;                      // Opera 5

       var DomNav=(DomYes&&NavYes)?1:0;                                 // Netscape 6 up

      var DomExp=(DomYes&&ExpYes)?1:0;                                 // IExplorer 5 up

       var Nav4=(NavYes&&!DomYes&&document.layers)?1:0;                // Netscape 4

       var Exp4=(ExpYes&&!DomYes&&document.all)?1:0;                           // IExplorer 4

 

       var StartS=1314,StartT=1062,DeltaS=20,DeltaT=17.5,ShdLyr,TpLyr,Counter=100,IntTimer,DeltaDelta=.15;

 

       function ShowLogo(){

              ShdLyr=(DomYes)?document.getElementById('Shd'):(Nav4)?document.layers['Shd']:document.all['Shd'];

              TpLyr=(DomYes)?document.getElementById('Tp'):(Nav4)?document.layers['Tp']:document.all['Tp'];

              ShdStyle=(Nav4)?ShdLyr:ShdLyr.style;

              TpStyle=(Nav4)?TpLyr:TpLyr.style;

              ShdStyle.left=StartS;

              TpStyle.left=StartT;

              ShdStyle.visibility=TpStyle.visibility=(Nav4)?'show':'visible';

              IntTimer=setInterval('MoveLogo()',25)}

 

       function MoveLogo(){

              StartS-=DeltaS;

              StartT-=DeltaT;

              DeltaS-=DeltaDelta;

              DeltaT-=DeltaDelta;

              ShdStyle.left=StartS;

              TpStyle.left=StartT;

              Counter--;

              if(!Counter)clearInterval(IntTimer)}

//-->

</script>

<div class="t1" id="ppkoabcd">这是重叠的文字</div>

<div class="shadow" id="Shd">这是重叠的文字</div>

<div class="top" id="Tp">这是重叠的文字</div>

<style type="text/css">

<!--

.t1                 {color: red; text-align: center; font: 45px/45px;}

.shadow,.top                 {position:absolute; width:500pt; font-size:36pt; visibility:hidden}

.shadow                        {top:8pt; left:16pt; color: green; text-align: center; font: 45px/45px;}

.top                       {top:7pt; left:15pt; color: blue; text-align: center; font: 45px/45px;}

//-->

</style>

 

 

 

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

<body bgcolor="#fef4d9" onload="ShowLogo();">

 

0 Comments

Thu

26

Feb

2009

126、大段文字一个个出现

126、大段文字一个个出现

脚本说明:

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

<script>

<!--

newAuto = new Array();

newAuto[0]=" ==中国队还有两天就要迎战十强赛的第一个对手阿联酋队了,按照沈阳组委会的计划,822,是球迷换票的最后一天,但是因为出票的机器突然瘫痪,直到昨天傍晚记者截稿时止,还有几千张球票没有发到球迷的手中。五里河体育场东门外的球迷换票处失去了往日的宁静,换之以已经等不及的球迷混成一团的喧嚣声和叫骂声==! "

newAuto[1]="抚顺来的球迷老张怎么也没有想到,自己求爷爷告奶奶好不容易买到了十强赛的门票,但是在领票的时候却发现换票比求人买票还要费劲,他已经带着干粮在五里河体育场东门外等了将近三天了。与不幸的老张一样的球迷还有许多,他们每天早上九点准时来到五里河,下午六、七点才离开,与票务组人员上下班的时间一样。但票务组的工作人员总是以十分抱歉的口吻告诉球迷第二天再来。许多球迷抱怨说,他们本人都有繁忙的工作,为了到现场观看国家队的比赛,拿出自己的工资购买了十强赛的套票。得知组委会的换票通知后,在各自的单位都是请假来五里河取票。没想到,一等就是三天,既耽误了正常的工作,又额外增加了一笔意想不到的开销。虽然,售票人员的态度很好,但是,光是态度好,不解决实际问题是没有意义的。来自<a href=\"http://www.k688.com\">建站资源</a>"

topOffset="50";

leftOffset="10";

Width="750";

Align="left";

fontSize="2";

fontFace="Verdana";

fontColor="black";

typingSpeed=1;

pause=2000;

 

// Do NOT edit below this line.

if (document.getElementById)

document.write('<DIV ID="animText" STYLE="position:absolute;width:'+Width+'px;top:'+topOffset+';left:'+leftOffset+';" ALIGN="'+Align+'"></DIV>')

else

document.write('<LAYER NAME="animText" WIDTH="'+Width+'" TOP="'+topOffset+'" LEFT="'+leftOffset+'"></LAYER>')

aat1=-1;

aat2=0;

aat3=0;

t3=""

function autoanimText(number, which) {

text=newAuto[number]

thenum=number

if (which=="begin") {

if (aat1<text.length) {

aat1++;

t1=text.substring(aat1, aat1+1)

if (t1=="<") {

aat3+=1

t2=text.indexOf(">",aat3);

t3=text.substring(aat1,t2+1)

if (t3.length==4) {t3=""}

aat3=t2+1

aat1=aat3}

begin='<DIV ALIGN="'+Align+'"><FONT SIZE="'+fontSize+'" FACE="'+fontFace+'" COLOR="'+fontColor+'">'

text2=text.substring(0, aat1+1);

if (t3>"") {

t5=t3.indexOf(' ',0)

t4=t3.substring(1,t5)

text2+="</"+t4+">"}

if (document.getElementById) {

document.getElementById("animText").innerHTML=begin+text2+'</FONT></DIV>'}

if (document.layers) {

document.layers["animText"].document.write(begin+text2+'</FONT></DIV>');

document.layers["animText"].document.close();}

autoanimateText = setTimeout('autoanimText(thenum, "begin")', typingSpeed);}

else {aat1=-1;aat3=-1;clearInterval(autoanimateText);setTimeout('autoanimText(thenum, "end")', pause);}}

else if (which=="end") {

if (aat1<text.length) {

aat1++;

t1=text.substring(aat1, aat1+1)

if (t1=="<") {

aat3+=1

t2=text.indexOf(">",aat3);

t3=text.substring(aat1,t2+1)

if (t3.length==4) {t3=""}

aat3=t2+1

aat1=aat3}

begin='<DIV ALIGN="'+Align+'"><FONT SIZE="'+fontSize+'" FACE="'+fontFace+'" COLOR="'+fontColor+'"><SPAN STYLE="position:relative;visibility:hidden">'

text2=text.substring(0, aat1)

text3=text.substring(aat1, text.length);

if (t3>"") {

t5=t3.indexOf(' ',0)

t4=t3.substring(1,t5)

text2+="</"+t4+">"}

if (document.getElementById) {

document.getElementById("animText").innerHTML=begin+text2+'</SPAN>'+t3+text3+'</FONT></DIV>'}

if (document.layers) {

document.layers["animText"].document.write(begin+text2+'</SPAN>'+t3+text3+'</FONT></DIV>');

document.layers["animText"].document.close();}

autoanimateText = setTimeout('autoanimText(thenum, "end")', (typingSpeed/2));

}

else {aat1=-1;aat3=0;aat2++;clearInterval(autoanimateText);setTimeout('autoanimText((aat2)%newAuto.length, "begin")', 50);}}}

function startAAT3() {

if (document.getElementById) {

document.getElementById("animText").innerHTML='<SPAN STYLE="position:relative;visibility:hidden">'+newAuto[0]+'</SPAN>'}

if (document.layers) {

document.layers["animText"].document

.write('<SPAN STYLE="position:relative;visibility:hidden">'+newAuto[0]+'</SPAN>');

document.layers["animText"].document.close();}

autoanimText(0,'begin')}

window.onload=startAAT3

//-->

</script>

 

0 Comments

Thu

26

Feb

2009

125、文字向上滚动效果

125、文字向上滚动效果

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

 

<!-- Begin

//scroller width

var swidth=300

 

//scroller height

var sheight=100

 

 

//scroller's speed;

var sspeed=2

 

var wholemessage=''

 

//text: change to your own

 

wholemessage='<div align="center"><font face=Arial size=3 color="#ffffff">黄牛刺激买票人</DIV><div align="center">抚顺来的球迷老张怎么也没有想到,自己求爷爷告奶奶好不容易买到了十强赛的门票,但是在领票的时候却发现换票比求人买票还要费劲.</strong></DIV><div align="center"><strong>里面传出争吵声 </strong></DIV><div align="center">沈阳组委会这次的球票发售环节出现很多问题早已经不是新闻了</div><div align="center">编缉:飞毛腿</div></font>'

 

function start(){

if (document.all) return

if (document.getElementById){

document.getElementById("slider").style.visibility="show"

ns6marquee(document.getElementById('slider'))

}

else if(document.layers){

document.slider1.visibility="show"

ns4marquee(document.slider1.document.slider2)

}

}

function ns4marquee(whichlayer){

ns4layer=eval(whichlayer)

ns4layer.document.write(wholemessage)

ns4layer.document.close()

sizeup=ns4layer.document.height

ns4layer.top-=sizeup

ns4slide()

}

function ns4slide(){

if (ns4layer.top>=sizeup*(-1)){

ns4layer.top-=sspeed

setTimeout("ns4slide()",100)

}

else{

ns4layer.top=sheight

ns4slide()

}

}

function ns6marquee(whichdiv){

ns6div=eval(whichdiv)

ns6div.innerHTML=wholemessage

ns6div.style.top=sheight

sizeup=sheight

ns6slide()

}

function ns6slide(){

if (parseInt(ns6div.style.top)>=sizeup*(-1)){

ns6div.style.top=parseInt(ns6div.style.top)-sspeed

setTimeout("ns6slide()",100)

}

else{

ns6div.style.top=sheight

ns6slide()

}

}

//  End -->

</script>

 

<span style="borderWidth:1; borderColor:red; width:300; height:100;">

<ilayer width=300 height=100 name="slider1" bgcolor="black" visibility=hide>

<layer name="slider2" onMouseover="sspeed=0;" onMouseout="sspeed=2">

</layer>

</ilayer>

<script language="JavaScript">

if (document.all){

document.writeln('<marquee id="ieslider" scrollAmount=2 width=300 height=100 direction=up style="border:1 solid red;background-color:black">')

document.writeln(wholemessage)

ieslider.onmouseover=new Function("ieslider.scrollAmount=0")

ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=2")

document.write('</marquee>')

}

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

document.write('<div style="position:relative;overflow:hidden;width:300;height:100;clip:rect(0 302 102 0); background-color:black;border:1px solid red;" onMouseover="sspeed=0;" onMouseout="sspeed=2">')

document.write('<div id="slider" style="position:relative;width:&{swidth};">')

document.write('</div></div>')

}

</script></span>

 

 

 

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

<body bgcolor="#fef4d9" onLoad='start()'>

 

0 Comments

Thu

26

Feb

2009

124、特殊的输入框显示

124、特殊的输入框显示

脚本说明:

<input style="COLOR: #ffffff; BACKGROUND-COLOR: #9999cc; BORDER-RIGHT: rgb(0,0,0) 1px dashed; BORDER-TOP: rgb(0,0,0) 1px dotted; BORDER-LEFT: rgb(0,0,0) 1px dotted; BORDER-BOTTOM: rgb(0,0,0) 1px dotted" type="text" size="17" value=" 请填入您的E-Mail">

 

0 Comments

Thu

26

Feb

2009

123、可控制的闪烁链接

123、可控制的闪烁链接

脚本说明:

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

<style>

 

.F1 {filter: glow(Color=#FF8000,Strength=10);

     width=150px;

     height=200px;}

    

.F2 {filter: glow(Color=#00FF00,Strength=9);

     width=110px;

     height=200px;}

    

.F3 {filter: glow(Color=#0080FF,Strength=12);

     width=90px;

     height=200px;}

    

</style>

<script>

var rate = 500

 

 

// do not edit below this line

// ============================

 

var i = 0

var F = 'F1'

function doThing(){

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

      ok =  true

      i++;

      if (i==1) F = 'F1'

      if (i==2) F = 'F2'

      if (i==3) F = 'F3' 

      YammaYamma.className=F

      if (i > 2) i = 0

      timer=setTimeout('doThing()', rate)

   }        

}

 

</script>

<table width="200" cellspacing="0" cellpadding="10">

  <tr>

    <td>

      <center>

        <font face="Courier" size="4" color="#FFFFFF">

        <p id="YammaYamma">

        <b>欢迎你的光临...</b>

        </p>

        </font>

      </center>

    </td>

  </tr>

</table>

 

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

<body  onload="doThing()">

 

0 Comments

Thu

26

Feb

2009

122、变色的重要提示文字

122、变色的重要提示文字

脚本说明:

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

<script language="JavaScript1.2">

var message=" 招聘启事"

var neonbasecolor="#FF930D"

var neontextcolor="#00B3FD"

var flashspeed=300  //in milliseconds

 

var n=0

if (document.all){

document.write('<font color="'+neonbasecolor+'">')

for (m=0;m<message.length;m++)

document.write('<span id="neonlight" class="content">'+message.charAt(m)+'</span>')

document.write('</font>')

 

//cache reference to neonlight array

var tempref=document.all.neonlight

}

else

document.write(message)

 

function neon(){

 

//Change all letters to base color

if (n==0){

for (m=0;m<message.length;m++)

tempref[m].style.color=neonbasecolor

}

 

//cycle through and change individual letters to neon color

tempref[n].style.color=neontextcolor

 

if (n<tempref.length-1)

n++

else{

n=0

clearInterval(flashing)

setTimeout("beginneon()",1500)

return

}

}

 

function beginneon(){

if (document.all)

flashing=setInterval("neon()",flashspeed)

}

beginneon()

 

</script>

0 Comments

Thu

26

Feb

2009

121、Input框中的滚动信息

121Input框中的滚动信息

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

// THESE VARIABLES CAN BE CHANGED //

var myMainMessage="  欢迎光临7stk.com,这里是滚动的文字,你可以多写入一些信息,谢谢,请多提意见! ";

var speed=150;

var scrollingRegion=50;

 

// END CHANGEABLE VARIABLES //

var startPosition=0;

function mainTextScroller() {

        var mainMessage=myMainMessage;

        var tempLoc=(scrollingRegion*3/mainMessage.length)+1;

        if (tempLoc<1) {tempLoc=1}

        var counter;

        for(counter=0;counter<=tempLoc;counter++)

           mainMessage+=mainMessage;

document.mainForm.mainTextScroller.value=mainMessage.substring(startPosition,startPosition+scrollingRegion);

        startPosition++;

        if(startPosition>scrollingRegion) startPosition=0;

        setTimeout("mainTextScroller()",speed); }

//  End -->

</script>

<form name="mainForm">

<center>

<input type="text" name="mainTextScroller" size="40" value>

</center>

</form>

 

 

 

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

<body  onLoad="mainTextScroller()">

 

0 Comments