上一页       3     4     5     6            下一页

 

文字特效代码3

 

Tue

24

Feb

2009

90、按钮与input框

90、按钮与input

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function Menu1(form) {

form.TXTVal.value="这是第一个按钮的内容介绍";

   }

function Menu2(form) {

form.TXTVal.value="这是第二个按钮的内容介绍";

   }

function Menu3(form) {

form.TXTVal.value="这是第三个按钮的内容介绍";

   }

//  End -->

</script>

<form><input type="button" value="按钮一" onmouseover="Menu1(this.form);" onclick="javascript:alert('这是按钮一的警告信息')"><input type="button" value="按钮二" onmouseover="Menu2(this.form);" onclick="javascript:alert('这是按钮二的警告信息')"><input type="button" value="按钮三" onmouseover="Menu3(this.form);" onclick="javascript:alert('这是按钮三的警告信息')"><br><input type="text" name="TXTVal" size="30"></form>

 

0 Comments

Tue

24

Feb

2009

89、闪动的文字效果

89、闪动的文字效果

脚本说明:

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

<script language="JavaScript1.2">

var message="你现在还好吗?"

var neonbasecolor="gray"

var neontextcolor="yellow"

var neontextcolor2="#FFFFA8"

var flashspeed=100                                    // speed of flashing in milliseconds

var flashingletters=3                                         // number of letters flashing in neontextcolor

var flashingletters2=1                                       // number of letters flashing in neontextcolor2 (0 to disable)

var flashpause=0                                       // the pause between flash-cycles in milliseconds

 

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

 

var n=0

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

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

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

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

document.write('</font>')

}

else

document.write(message)

 

function crossref(number){

var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)

return crossobj

}

 

function neon(){

 

//Change all letters to base color

if (n==0){

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

crossref(m).style.color=neonbasecolor

}

 

//cycle through and change individual letters to neon color

crossref(n).style.color=neontextcolor

 

if (n>flashingletters-1) crossref(n-flashingletters).style.color=neontextcolor2

if (n>(flashingletters+flashingletters2)-1) crossref(n-flashingletters-flashingletters2).style.color=neonbasecolor

 

 

if (n<message.length-1)

n++

else{

n=0

clearInterval(flashing)

setTimeout("beginneon()",flashpause)

return

}

}

 

function beginneon(){

if (document.all||document.getElementById)

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

}

beginneon()

 

 

</script>

 

0 Comments

Tue

24

Feb

2009

88、文字的特殊显示方法

88、文字的特殊显示方法

脚本说明:

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

<script language=JavaScript>    

<!-- Begin    

text = "http://www.7stk.com  网页特效代码欢迎你的光临……"; //显示的文字    

color1 = "green"; //文字的颜色    

color2 = "red"; //转换的颜色    

fontsize = "1"; //字体大小    

speed = 100; //转换速度 (1000 = 1 )     

i = 0;    

if (navigator.appName == "Netscape") {    

document.write("<layer id=a visibility=show></layer><br><br><br>");    

}    

else {    

document.write("<div id=a></div>");    

}    

function changeCharColor() {    

if (navigator.appName == "Netscape") {    

document.a.document.write("<center><font face=arial ><font color=" + color1 +     

">");    

for (var j = 0; j < text.length; j++) {    

if(j == i) {    

document.a.document.write("<font face=arial color=" + color2 + ">" + Text.charAt(i) + "</font>");    

}    

else {    

document.a.document.write(text.charAt(j));    

}    

}    

document.a.document.write('</font></font></center>');    

document.a.document.close();    

}    

if (navigator.appName == "Microsoft Internet Explorer") {    

str = "<font face=arial><font color=" + color1 + ">";    

for (var j = 0; j < text.length; j++) {    

if( j == i) {    

str += "<font face=arial color=" + color2 + ">" + text.charAt(i) + "</font>";    

}    

else {    

str += text.charAt(j);    

}    

}    

str += "</font></font>";    

a.innerHTML = str;    

}    

(i == text.length) ? i=0 : i++;    

}    

setInterval("changeCharColor()", speed);    

// End -->    

</script>

<script>

var message="http://www.7stk.com  网页特效代码欢迎你的光临……"

var n=0;

if (document.all){

document.write('<font size="9px" color="#009900">')

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

document.write('<span id="neonlight" style="font-size:12px">'+message.charAt(m)+'</span>')

document.write('</font>')

var tempref=document.all.neonlight

}

else

document.write(message)

function neon(){

if (n==0){

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

tempref[m].style.color="#009900"

}

tempref[n].style.color="#FF0000"

if (n<tempref.length-1)

n++

else{

n=0

clearInterval(flashing)

setTimeout("beginneon()",1500)

return

}

}

function beginneon(){

if (document.all)

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

}

beginneon()

</script>

 

0 Comments

Tue

24

Feb

2009

87、文字上的问号说明

87、文字上的问号说明

脚本说明:

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

<OBJECT

id=pophelp

type="application/x-oleobject"

classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"

<PARAM name="Command" value="HH Version">

</OBJECT>

 

<script language=javascript>

popstyle= "Verdana,10,,";//弹出式帮助字体设定

 

function showPophelp(helpstr,w,h,Foreground,Background){

if (body.style.cursor=='help')

pophelp.TextPopup(helpstr,popstyle,w,h,Foreground,Background);

}

 

document.onclick=resetCursor

function resetCursor(){

if (!(event.srcElement.innerText==""))

body.style.cursor='default';

}

</script>

<span onclick="javascript:body.style.cursor='help';" style="cursor:help;"><big><b></b></big></span>(说明:先点击前面""符号,当鼠标样式变为"求助"时,点击下面文字。)<br>

<span onclick="showPophelp('这是弹出式帮助',20,20,0,255)">弹出式帮助</span><br><br>

<span onclick="showPophelp('欢迎大家一起讨论网络编程技术。',20,50,0,0)">说明文字</span><br><br>

<span onclick="showPophelp('webm4564588.com',20,20,0,0)">电子信箱</span><br><br>

<span onclick="showPophelp('http://www.7stk.com',20,20,0,0)">网址</span>

 

 

第二步:把<body>中的代码改为:

<BODY bgColor=black id=body style="cursor:default;">

 

0 Comments

Tue

24

Feb

2009

86、变色的文字

86、变色的文字

脚本说明:

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

<SCRIPT language=JavaScript1.2>

<!-- Begin

function initArray() {

this.length = initArray.arguments.length;

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

this[i] = initArray.arguments[i];

}

}

 

var ctext = "欢迎光临7stk.com"

var speed = 1000;

var x = 0;

var color = new initArray(

"red",

"blue",

"green",

"black",

"darkred",

"gray"

);

 

//以上的颜色过渡可以自由设定,参考颜色配色表。

 

if(navigator.appName == "Netscape") {

document.write('<layer id="c">'+ctext+'</layer><br>');

}

if (navigator.appVersion.indexOf("MSIE") != -1){

document.write('<div id="c">'+ctext+'</div>');

}

function chcolor(){

if(navigator.appName == "Netscape") {

document.c.document.write('<font color="'+color[x]);

document.c.document.write('">'+ctext+'</font>');

document.c.document.close();

}

else if (navigator.appVersion.indexOf("MSIE") != -1){

document.all.c.style.color = color[x];

}

(x < color.length-1) ? x++ : x = 0;

}

setInterval("chcolor()",1000);

// End -->

</SCRIPT>

 

0 Comments

Tue

24

Feb

2009

85、数字金字塔

85、数字金字塔

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

a="FFFF00#669900#336600#3366CC#CC0066#FF00CC#CC0000#009900#999900"

b=a.split("#")

function add(n,m){

var p=""

for(y=0;y<n;y++){p+=m}

return p}

for(x=1;x<10;x++){

document.write("<FONT face=宋体 COLOR=#"+b[x]+">"+add(10-x," ")+add(x,x+" ")+"</FONT><br>")

}

</SCRIPT>

 

0 Comments

Tue

24

Feb

2009

84、超酷的立体文字

84、超酷的立体文字

脚本说明:

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

<STYLE type=text/css>A:link {

       TEXT-DECORATION: none

}

A:visited {

       TEXT-DECORATION: none

}

A:active {

       TEXT-DECORATION: none

}

A:hover {

       TEXT-DECORATION: none

}

.up {

       BORDER-RIGHT: #711200 1px solid; PADDING-RIGHT: 1px; BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; FONT-SIZE: 9pt; PADDING-BOTTOM: 1px; BORDER-LEFT: white 1px solid; COLOR: #ff0000; PADDING-TOP: 1px; BORDER-BOTTOM: #711200 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #eadfd0

}

</STYLE>

 

<SCRIPT language=JavaScript>

<!-- IE and NS6 Menu Button script kurt.grigg@virgin.net

if (!document.layers){

 

// Choose size and colours here!

Width=100;

Font='Verdana';

FontSize=9;

AFontColor='#000000';

BFontColor='red';

CFontColor='#ffffff';

down="#6699cc";

FontWeight='normal';  //normal or bold!

BackGround='#99ccff'; //Same as your body bgcolor!

BorderDepth=2;

BorderLight='#FFFFFF';

BorderShad='#000000';

 

//Nothing needs altering past here!!!!!!!!!!!!!!!!!!!!!!

function On(id){

with(id.style){

color=BFontColor;

borderTopColor=BorderLight;

borderLeftColor=BorderLight;

borderRightColor=BorderShad;

borderBottomColor=BorderShad;

}

}

function Off(id){

with(id.style){

color=AFontColor;

borderTopColor=BackGround;

borderLeftColor=BackGround;

borderRightColor=BackGround;

borderBottomColor=BackGround;

background=BackGround;

}

}

function Down(id){

with(id.style){

color=CFontColor;

borderTopColor=BorderShad;

borderLeftColor=BorderShad;

borderRightColor=BorderLight;

borderBottomColor=BorderLight;

background=down;

}

}

function Link(Url,Txt,target){

document.write("<a href='"+Url+"' target='"+target+"'>"

+"<div style='position:relative;"

+"width:"+Width+"px;height:"+FontSize+"px;"

+"border-width:"+BorderDepth+"px;"

+"border-color:"+BackGround+";"

+"border-style:solid;"

+"padding:"+FontSize/4.5+"pt;"

+"background:"+BackGround+";"

+"font-family:"+Font+";"

+"font-size:"+FontSize+"pt;"

+"line-height:"+FontSize*1.2+"pt;"

+"font-weight:"+FontWeight+";"

+"text-align:left;"

+"color:"+AFontColor+";"

+"margin-top:2px;"

+"cursor:hand'"

+"onMouseOver='javascript:On(this)'"

+"onMouseOut='javascript:Off(this)'"

+"onMouseDown='javascript:Down(this)'>"

+Txt+"</div></a>");

}

}

function Temp(){

alert("TEST");

}

//-->

</SCRIPT>

<!-- End Menu Buttons Part:1 --><!-- Menu Buttons Part:2 Paste in Body where needed -->

<SCRIPT language=JavaScript>

<!--

if (!document.layers){

//This table stops oddness in NS6!!!

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

document.write("<div style='position:relative'>"

+"<table border='0' cellpadding='0' cellspacing='0'>"

+"<tr><td valign='top'>");

}

 

/*   The visible Buttons here!

Add as many as you want. Make sure

you follow the same format as below

eg: Link('MyOtherPage.html','See my other page');

*/

Link('http://www.7stk.com/fine/ny/n1.htm','我祝福你,圣诞节快快乐乐、幸幸福福','_blank');

Link('http://www.7stk.com','网页特效代码','_blank');

Link('http://www.yahoo.com','Yahoo','_blank');

Link('http://www.google.com','Google','_blank');

Link('http://www.7stk.com/1/index06.htm','我祝福你,圣诞节快快乐乐、幸幸福福','_blank');

Link('http://www.163.com','网易','main');

Link('http://www.7stk.com/fine/ch/c01.htm','我祝福你,圣诞节快快乐乐、幸幸福福','_blank');

Link('http://www.7stk.com/fine/ch/c01.htm','我祝福你,圣诞节快快乐乐、幸幸福福','_blank');

 

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

document.write("</td></tr></table></div>");

}

}

//-->

</SCRIPT>

 

1 Comments

Tue

24

Feb

2009

83、精彩的文字阴影效果

83、精彩的文字阴影效果

脚本说明:

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

<script>

<!--

 

var divs = new Array();

var da = document.all;

var start;

 

//CONFIGUER THESE VARS!!!!!!

//speed of pulsing

var speed = 50;

 

function initVars(){

 

if (!document.all)

return

 

addDiv(hi,"lime",2,11);

addDiv(welcome,"red",4,9);

addDiv(message,"purple",2,4);

addDiv(msg2,"orange",15,17);

addDiv(msg3,"blue",1,3);

 

//NO MORE EDITING!!!!!!

 

 

 

startGlow();

}

 

function addDiv(id,color,min,max)

{

var j = divs.length;

divs[j] = new Array(5);

divs[j][0] = id;

divs[j][1] = color;

divs[j][2] = min;

divs[j][3] = max;

divs[j][4] = true;

}

 

function startGlow()

{

       if (!document.all)

              return 0;

 

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

       {

              divs[i][0].style.filter = "Glow(Color=" + divs[i][1] + ", Strength=" + divs[i][2] + ")";

              divs[i][0].style.width = "100%";

       }

 

       start = setInterval('update()',speed);

}

 

function update()

{

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

       {

              if (divs[i][4])

              {

                     divs[i][0].filters.Glow.Strength++;

                     if (divs[i][0].filters.Glow.Strength == divs[i][3])

                            divs[i][4] = false;

              }

      

              if (!divs[i][4])

              {

                     divs[i][0].filters.Glow.Strength--;

                     if (divs[i][0].filters.Glow.Strength == divs[i][2])

                            divs[i][4] = true;

              }

       }

}

-->

</script>

<div id="hi" style="color: lime">

Hello!

</div>

<br>

<div id="welcome" style="color: lime">

Welcome!你好!

</div>

<br>

<div id="message" style="color: lime">

This is a pulsating message!

</div>

<br>

<div id="msg2" style="color: lime">

This is another pulsating message!

</div>

<br>

<div id="msg3" style="color: lime">

This is yet another pulsating message!

</div>

 

 

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

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

 

0 Comments

Tue

24

Feb

2009

82、循环显示的文字

82、循环显示的文字

脚本说明:

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

<script language="JavaScript1.2">

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

var fcontent=new Array()

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

fcontent[0]="<b>Welcome</b><br>欢迎来到网络编程站<br><br>请多提宝贵意见,谢谢"

fcontent[1]="本站有超过1000种的各种各样的代码,你一定会找到你非常喜欢的东东"

fcontent[2]="不要犹豫了,赶快开始找吧,欢迎你再次光临.请记住本站域名吧。<BR><BR>www.1stscript.com"

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

Tue

24

Feb

2009

81、文字切换广告特效

81、文字切换广告特效

脚本说明:

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

<script language="JavaScript">

<!--

function MM_reloadPage(init) {  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);

// -->

</script>

  <script language="JavaScript">

<!--//

//message数组,随意增加更多的message;注意数组下标从0开始;

var message=new Array()

message[0]="圣诞节就要到来了,如何安排啊??"

message[1]="很想念远方的亲人,别忘了给朋友寄一张贺卡啊!"

message[2]="不要工作,要休息"

message[3]="Merry Christmas Day and Happy NEW Year !"

message[4]="Join Maillist right Now!"

 

//每个message对应的连接

var messageurl = new Array()

messageurl[0]="http://www.7stk.com/fine/ch/c01.htm"

messageurl[1]="http://www.7stk.com/fine/zhufu/zhu07.htm"

messageurl[2]="http://www.7stk.com/fine/ny/n1.htm"

messageurl[3]="http://www.7stk.com"

messageurl[4]="http://www.7stk.com"

 

// 字体大小颜色

var fntsize=2

var fntface="Verdana"

var fntcolor="white"

 

// 字体是否加粗

var fontweight="yes"

 

//  messagebox的背景颜色

var backgroundcolor="red"

 

// messagebox的宽度和高度 (pixels)

var messagewidth="280"

var messageheight="70"

 

// 边缘宽度

var borderwidth="1"

 

// messages相对于messagebox的位置关系,前者水平关系后者垂直关系;

var messagealign="center"

var messagevalign="middle"

 

// 距离页面顶部的距离(精确调整位置)

var messages_top=30

 

// 距离页面左侧的距离(精确调整位置)

var messages_left=50

 

// 效果转换速度(越小越快)

var pause=50

 

// 停滞时间(秒)

var standstill=3

 

// -->

</script>

<script>

var coverimage = new Array()

coverimage[0]="sto/xx.gif"

coverimage[1]="sto/xx.gif"

coverimage[2]="sto/xx.gif"

coverimage[3]="sto/xx.gif"

coverimage[4]="sto/xx.gif"

coverimage[5]="sto/xx.gif"

coverimage[6]="sto/xx.gif"

coverimage[7]="sto/xx.gif"

 

var covimgpreload=new Array()

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

       covimgpreload[i]=new Image()

       covimgpreload[i].src=coverimage[i]

}

var i_messages=0

var i_loop=0

var thisurl=0

var timer

var coverwidth

var coverheight

standstill=standstill*1000

 

var content

if (fontweight=="yes") {

    fontweight="<b>"

}

else {fontweight=""}

 

function init() {

    //实际上显示的messagetable由这里控制,如果你明白代码的含义,可以自由度更大的修改;

    content="<table width='"+messagewidth+"' height='"+messageheight+"' border='"+borderwidth+"'>"

    content+="<tr valign='"+messagevalign+"'><td align='"+messagealign+"' bgcolor='"+backgroundcolor+"'>"

    content+="<font size='"+fntsize+"' face='"+fntface+"'  color='"+fntcolor+"'>"

    content+=fontweight

    content+=message[i_messages]

    content+="</font></td></tr></table>"

    if (document.all) {

       document.all.messagebox.style.posTop=messages_top

        document.all.messagebox.style.posLeft=messages_left

        document.all.cover.style.posTop=messages_top

        document.all.cover.style.posLeft=messages_left

              messagebox.innerHTML=content

              coverwidth=messagebox.offsetWidth

              coverheight=messagebox.offsetHeight

              cover.innerHTML="<a href='javascript:gotourl()'><img width="+coverwidth+" height="+coverheight+" name='imgcover' src='"+coverimage[i_loop]+"' border=0></a>"

             

        enlargehearts()

    }

      

       if (document.layers) {

           document.messagebox.top=messages_top

        document.messagebox.left=messages_left

        document.cover.top=messages_top

        document.cover.left=messages_left

              document.messagebox.document.write(content)

              document.messagebox.document.close()

              coverwidth=document.messagebox.document.width

              coverheight=document.messagebox.document.height

              document.cover.document.write("<a href='javascript:gotourl()'><img width="+coverwidth+" height="+coverheight+" name='imgcover' src='"+coverimage[i_loop]+"' border=0></a>")

              document.cover.document.close()

             

        enlargehearts()

    }

}

 

function enlargehearts() {

        if (i_loop<=coverimage.length-1) {  

            if (document.all) {

                imgcover.src=coverimage[i_loop]

            }

            if (document.layers) {

                document.cover.document.imgcover.src=coverimage[i_loop]

            }

            i_loop++

            timer= setTimeout("enlargehearts()",pause) 

        }

        else {

            clearTimeout(timer)

            i_loop--

            timer= setTimeout("shrinkhearts()",standstill)

       }

}

 

function shrinkhearts() {

        if (i_loop>=0) { 

            if (document.all) {

                imgcover.src=coverimage[i_loop]

            }

            if (document.layers) {

                document.cover.document.imgcover.src=coverimage[i_loop]

            }

            i_loop--

            timer= setTimeout("shrinkhearts()",pause)

        }

        else {

            clearTimeout(timer)

            i_loop=0

            i_messages++

           

            if (i_messages>=message.length) {i_messages=0}

                content="<table width='"+messagewidth+"' height='"+messageheight+"' border='"+borderwidth+"'>"

                content+="<tr valign='"+messagevalign+"'><td align='"+messagealign+"' bgcolor='"+backgroundcolor+"'>"

                content+="<font size='"+fntsize+"' face='"+fntface+"'  color='"+fntcolor+"'>"

                content+=fontweight

                content+=message[i_messages]

                content+="</font></td></tr></table>"

                if (document.all) {

                    messagebox.innerHTML=content

                }

                if (document.layers) {

                    document.messagebox.document.write(content)

                    document.messagebox.document.close()

                }

            timer= setTimeout("enlargehearts()",(4*pause))

        }

}

 

function gotourl() {

       document.location.href=messageurl[i_messages]

}

window.onload=init

</script>

<div id="messagebox" style="position:absolute"> </div>

<div id="cover" style="position:absolute"> </div>

 

 

 

0 Comments

Tue

24

Feb

2009

80、文字滚动显示

80、文字滚动显示

脚本说明:

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

<STYLE type=text/css>

.content {       FONT: 9pt/12pt "宋体"

}

.sm {      FONT: 8pt/10pt "宋体"

}

</STYLE>

<SCRIPT language=JavaScript>

//configure the below five variables to change the style of the scroller

var scrollerwidth=160

var scrollerheight=50

var scrollerbgcolor='#3399FF'

//set below to '' if you don't wish to use a background image

var scrollerbackground=''

 

//configure the below variable to change the contents of the scroller

var messages=new Array()

messages[0]=""

messages[1]=""

messages[2]=""

messages[0]=messages[0] + '<span class=content><font color=white> 澳元                /美元                0.5339 0.5351</font></span><br>'

messages[0]=messages[0] + '<span class=content><font color=white> 美元                /港币                7.7967 7.8027</font></span><br>'

messages[0]=messages[0] + '<span class=content><font color=white> 美元                /加元                1.5987 1.6013</font></span><br>'

messages[1]=messages[1] + '<span class=content><font color=white> 美元                /日元                133.40 133.60</font></span><br>'

messages[1]=messages[1] + '<span class=content><font color=white> 美元                /新元                1.8457 1.8487</font></span><br>'

messages[1]=messages[1] + '<span class=content><font color=white> 美元                /瑞郎                1.6625 1.6651</font></span><br>'

messages[2]=messages[2] + '<span class=content><font color=white> 欧元                /美元                0.8781 0.8797</font></span><br>'

messages[2]=messages[2] + '<span class=content><font color=white> 英镑                /美元                1.4372 1.4392</font></span><br>'

 

 

///////Do not edit pass this line///////////////////////

if (messages.length>1)

i=2

else

i=0

 

function move1(whichlayer){

tlayer=eval(whichlayer)

if (tlayer.top>0&&tlayer.top<=5){

tlayer.top=0

setTimeout("move1(tlayer)",5000)

setTimeout("move2(document.main.document.second)",5000)

return

}

if (tlayer.top>=tlayer.document.height*-1){

tlayer.top-=5

setTimeout("move1(tlayer)",100)

}

else{

tlayer.top=scrollerheight

tlayer.document.write(messages[i])

tlayer.document.close()

if (i==messages.length-1)

i=0

else

i++

}

}

 

function move2(whichlayer){

tlayer2=eval(whichlayer)

if (tlayer2.top>0&&tlayer2.top<=5){

tlayer2.top=0

setTimeout("move2(tlayer2)",5000)

setTimeout("move1(document.main.document.first)",5000)

return

}

if (tlayer2.top>=tlayer2.document.height*-1){

tlayer2.top-=5

setTimeout("move2(tlayer2)",100)

}

else{

tlayer2.top=scrollerheight

tlayer2.document.write(messages[i])

tlayer2.document.close()

if (i==messages.length-1)

i=0

else

i++

}

}

 

function move3(whichdiv){

tdiv=eval(whichdiv)

if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){

tdiv.style.pixelTop=0

setTimeout("move3(tdiv)",5000)

setTimeout("move4(second2)",5000)

return

}

if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){

tdiv.style.pixelTop-=5

setTimeout("move3(tdiv)",100)

}

else{

tdiv.style.pixelTop=scrollerheight

tdiv.innerHTML=messages[i]

if (i==messages.length-1)

i=0

else

i++

}

}

 

function move4(whichdiv){

tdiv2=eval(whichdiv)

if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){

tdiv2.style.pixelTop=0

setTimeout("move4(tdiv2)",5000)

setTimeout("move3(first2)",5000)

return

}

if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){

tdiv2.style.pixelTop-=5

setTimeout("move4(second2)",100)

}

else{

tdiv2.style.pixelTop=scrollerheight

tdiv2.innerHTML=messages[i]

if (i==messages.length-1)

i=0

else

i++

}

}

 

function startscroll(){

if (document.all){

move3(first2)

second2.style.top=scrollerheight

second2.style.visibility='visible'

}

else if (document.layers){

document.main.visibility='show'

move1(document.main.document.first)

document.main.document.second.top=scrollerheight+5

document.main.document.second.visibility='show'

}

}

 

function createLayer()

{

if (document.layers) {

document.writeln('<ilayer id="main" width='+scrollerwidth+'; height='+scrollerheight+'; bgColor='+scrollerbgcolor+'; background='+scrollerbackground+'; visibility=hide>')

document.writeln('<layer id="first" left=0 top=1 width=' +scrollerwidth+ ' 200>')

document.write(messages[0])

document.writeln('</layer>')

 

document.writeln('<layer id="second" left=0 top=0 width='+ scrollerwidth +'; visibility=hide>')

document.write(messages[1])

document.writeln('</layer>')

document.writeln('</ilayer>')

}

else if (document.all){

document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')

document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')

document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')

document.write(messages[0])

document.writeln('</div>')

document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0;visibility:hidden">')

document.write(messages[1])

document.writeln('</div>')

document.writeln('</div>')

document.writeln('</span>')

}

}

</SCRIPT>

<TABLE cellSpacing=0 borderColorDark=#00086a cellPadding=1 width="100px"

borderColorLight=#13a2ff border=1>

  <TBODY>

  <TR>

    <TD><SPAN class=content><center><FONT color=#ff930d>滚动外汇牌价</FONT></center></SPAN></TD></TR>

  <TR>

    <TD>

      <SCRIPT

      language=JavaScript> createLayer(); window.onload=startscroll; </SCRIPT>

    </TD>

  <TR>

  </TBODY></TABLE>

 

 

0 Comments

Tue

24

Feb

2009

79、滚动的文字说明

79、滚动的文字说明

脚本说明:

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

<style>

<!--

 

#listbutton{

border:1px solid #4B4B4B;

background-color:#F3F3F3;

width:50px;

height:12px;

font: normal 11px Arial;

text-align:center;

cursor:pointer;cursor:hand;

}

 

.expandhighlight, .expandhighlight a{

color:red;

}

 

-->

</style>

<script language="JavaScript1.2">

//configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)

var tickercontents=new Array()

tickercontents[0]='用数据广播方式,将信息内容完整镜像到PC机中'

tickercontents[1]='数据广播作为广播电视系统的新一代业务。'

tickercontents[2]='重新构思文化共享结构成为信息产业追求的目标之一。'

 

//configure the below 2 variables to set the width/background color of the ticker

var tickerwidth='475'

var tickerbgcolor='#DDDDFF'

 

//configure the below variable to determine the delay between ticking of messages (in miliseconds)

var tickdelay=3000

 

////Do not edit pass this line////////////////

 

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

var ns6=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1

var ns4=document.layers

 

var currentmessage=0

var tickercontentstotal=''

 

function changetickercontent(){

if (ns4){

tickerobj.document.tickernssub.document.write('<b><a href="#" onClick="return expandlist(event)">/</a></b> | '+tickercontents[currentmessage])

tickerobj.document.tickernssub.document.close()

}

else if (ie4||ns6){

tickerobj.innerHTML=tickercontents[currentmessage]

previousmessage=(currentmessage==0)? tickercontents.length-1 : currentmessage-1

tickerexpand_item=ns6? document.getElementById("expand"+currentmessage) : eval("expand"+currentmessage)

tickerexpand_previousitem=ns6? document.getElementById("expand"+previousmessage) : eval("expand"+previousmessage)

tickerexpand_previousitem.className=""

tickerexpand_item.className="expandhighlight"

}

 

currentmessage=(currentmessage==tickercontents.length-1)? 0 : currentmessage+1

setTimeout("changetickercontent()",tickdelay)

}

 

function start_ticking(){

if (ns4) document.tickernsmain.visibility="show"

tickerobj=ie4? tickerlist : ns6? document.getElementById("tickerlist") : ns4? document.tickernsmain : ""

tickerexpandobj=ie4? tickerexpand : ns6? document.getElementById("tickerexpand") : ns4? document.expandlayer : ""

 

for (i=0;i<tickercontents.length;i++) //get total scroller contents

tickercontentstotal+='<div id="expand'+i+'">- '+tickercontents[i]+'</div>'

if (ie4||ns6)

tickerexpandobj.innerHTML=tickercontentstotal

else{

tickerexpandobj.document.write(tickercontentstotal)

tickerexpandobj.document.close()

}

changetickercontent()

}

 

function expandlist(e){

if (ie4||ns6){

tickerexpand_parent=ie4? tickerexpand.parentElement : document.getElementById("tickerexpand").parentNode

tickerexpand_parent.style.display=(tickerexpand_parent.style.display=="none")? "" : "none"

}

else{

document.expandlayer.left=e.pageX-e.layerX

document.expandlayer.top= e.pageY-e.layerY+20

document.expandlayer.visibility=(document.expandlayer.visibility=="hide")? "show" : "hide"

return false

}

}

 

if (ie4||ns6)

document.write('<table border="0" style="width:'+tickerwidth+';border:1px solid black;text-indent:2px" bgcolor="'+tickerbgcolor+'" cellspacing="0" cellpadding="0"><tr><td width="90%" id="tickerlist" bgcolor="'+tickerbgcolor+'"></td><td width="10%" bgcolor="'+tickerbgcolor+'"><div id="listbutton" onClick="expandlist()">/</div></td></tr><tr style="display:none"><td id="tickerexpand" width="90%" bgcolor="'+tickerbgcolor+'"> </td><td width="10%"></td></tr></table>')

 

window.onload=start_ticking

</script>

<ilayer id="tickernsmain" width=&{tickerwidth}; bgColor=&{tickerbgcolor}; visibility=hide><layer id="tickernssub" width=&{tickerwidth}; left=0 top=0></layer></ilayer>

<layer id="expandlayer" bgColor=&{tickerbgcolor}; visibility=hide></layer>

0 Comments

Tue

24

Feb

2009

78、类似FLASH的文字转换

78、类似FLASH的文字转换

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var qiksearch_js_text = new Array ("Hey 你好!", "欢迎你的光临", "JavaScript<br>资源库", "http://www.7stk.com");

var qiksearch_space_width = 390; // The width of the content space

var qiksearch_space_height = 50; // The height of the content space

var qiksearch_space_borderw=3; // Border width

var qiksearch_space_borderc="#CC0000"; // Border Color

var timeOutVal=150; // Delay in milliseconds

 

//--------------------------------------------------------------------------------------------

 

//-----------------------------DO-NOT-MODIFY-BELOW-THIS---------------------------------------

 

document.write('<table width="' + qiksearch_space_width + '" height="' + qiksearch_space_height + '" style="background:#FFFFFF; border:' + qiksearch_space_borderw + ' solid ' + qiksearch_space_borderc + '"><tr><td align="middle">');

document.write('<div id="qiksearch_js_space">');

document.write('</div>');

document.write('</td></tr></table>');

 

var def_10='A',def_11='B',def_12='C',def_13='D',def_14='E',def_15='F';

var colorVal=15;

var div_count=0;

 

function qiksearch_fade_desat(getColorIntVal)

{

 var returnVal;

 if(getColorIntVal>=10)

 {

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

  {

   if((getColorIntVal==i))

   {

    returnVal = eval('def_' + i);

   }

  }

 }

 else

 {

  returnVal=getColorIntVal;

 }

 return(returnVal);

}

 

function writeDiv()

{

 document.all.qiksearch_js_space.innerHTML= '<font face="verdana,arial,helvetica" size="-1" color="' +  joinColor(qiksearch_fade_desat(colorVal)) + '"><b>' + qiksearch_js_text[div_count] + '</span></b></font>' ;

 

 if((colorVal>0)  && (colorVal!=0))

 {

  colorVal--;

 }

 else

 {

  colorVal=15;

  if(div_count<qiksearch_js_text.length)

  {

   div_count++;

  }

  if(div_count==qiksearch_js_text.length)

  {

   document.all.qiksearch_js_space.innerHTML = '<a href="javascript:resetAll();writeDiv();" style="text-decoration:none" accesskey="l"><font color="#808080" face="verdana,arial,helvetica" size="-1"><b>再来一遍吧?</b></font></a>';

  }

 }

 

 if(div_count<qiksearch_js_text.length)

 {

  setTimeout("writeDiv()",timeOutVal);

 }

}

 

function joinColor(getColor)

{

 return (getColor + '0' + getColor + '0' + getColor + '0');

}

 

function resetAll()

{

 div_count=0;

 colorVal=15;

}

 

writeDiv();

//  End -->

</script>

 

0 Comments

Tue

24

Feb

2009

77、文字虚幻变换

77、文字虚幻变换

脚本说明:

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

<script language="JavaScript1.2">

 

var scroller_width=150

var scroller_height=115

var bgcolor='#E0EFD1'

var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)

 

var scrollercontent=new Array()

//Define scroller contents. Extend or contract array as needed

scrollercontent[0]='欢迎光临 <a href="http://www.k688.com">网络时空</a>多呆一会,你一定会有许多收获的哟!'

scrollercontent[1]='谢谢你光临 <a href="http://www.k688.com">网络时空</a>,多呆一会,你一定会有许多收获的哟!'

scrollercontent[2]='下次一定还要光临 <a href="http://www.k688.com">网络时空</a>哟,你一定会有许多收获的哟!'

 

 

////NO need to edit beyond here/////////////

 

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1

 

if (ie4||dom)

document.write('<div style="position:relative;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden"><div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')

else if (document.layers){

document.write('<ilayer id=tickernsmain visibility=hide width='+scroller_width+' height='+scroller_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+scroller_width+' height='+scroller_height+' left=0 top=0>'+scrollercontent[0]+'</layer></ilayer>')

}

 

var curpos=scroller_height*(1)

var degree=10

var curcanvas="canvas0"

var curindex=0

var nextindex=1

 

function moveslide(){

if (curpos>0){

curpos=Math.max(curpos-degree,0)

tempobj.style.top=curpos

}

else{

clearInterval(dropslide)

if (crossobj.filters)

crossobj.filters.alpha.opacity=100

else if (crossobj.style.MozOpacity)

crossobj.style.MozOpacity=1

nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"

tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)

tempobj.innerHTML=scrollercontent[curindex]

nextindex=(nextindex<scrollercontent.length-1)? nextindex+1 : 0

setTimeout("rotateslide()",pause)

}

}

 

function rotateslide(){

if (ie4||dom){

resetit(curcanvas)

crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)

crossobj.style.zIndex++

if (crossobj.filters)

document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20

else if (crossobj.style.MozOpacity)

document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas1").style.MozOpacity=0.2

var temp='setInterval("moveslide()",50)'

dropslide=eval(temp)

curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"

}

else if (document.layers){

crossobj.document.write(scrollercontent[curindex])

crossobj.document.close()

}

curindex=(curindex<scrollercontent.length-1)? curindex+1 : 0

}

 

function resetit(what){

curpos=scroller_height*(1)

var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)

crossobj.style.top=curpos

}

 

function startit(){

crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas) : document.tickernsmain.document.tickernssub

if (ie4||dom){

crossobj.innerHTML=scrollercontent[curindex]

rotateslide()

}

else{

document.tickernsmain.visibility='show'

curindex++

setInterval("rotateslide()",pause)

}

}

 

if (ie4||dom||document.layers)

window.onload=startit

 

</script>

 

0 Comments

Tue

24

Feb

2009

76、一个不停移动的小圆点

76、一个不停移动的小圆点

<body onselectstart="return false">

<script>

var curRects,moveStep,curLine,ballLen,moveTime

 

 

function startMove()

{

       curRects = document.body.createTextRange().getClientRects()

      

       var TempRect = ball.getBoundingClientRect()

      

       ballLen = TempRect.right - TempRect.left

      

       curLine = 0

       moveStep = 0

      

       clearTimeout(moveTime)

      

       moveBall()

}

 

window.onload = startMove

window.onresize = startMove

 

var isStop = false

 

function document.onclick()

{

       if(document.readyState == "complete")

       {

              isStop = !isStop

             

              if(isStop)

                     clearTimeout(moveTime)

              else

                     moveTime = setTimeout("moveBallInLine()",50)                           

       }

}

 

function moveBall()

{

       if(curLine == curRects.length)

              curLine = 0

      

       moveStep = 0

      

 

       with(ball.style)

       {

              top = curRects[curLine].top

              left = curRects[curLine].left

       }    

 

      

       moveTime = setTimeout("moveBallInLine()",50)      

}

 

function moveBallInLine()

{

       moveStep += 5

 

       if(moveStep < curRects[curLine].right - curRects[curLine].left - ballLen)

       {

              ball.style.left = moveStep + curRects[curLine].left            

             

              moveTime = setTimeout("moveBallInLine()",50)

       }

       else

       {

              ball.style.left = curRects[curLine].right - curRects[curLine].left - ballLen

             

              curLine ++

             

              moveBall()

       }

}

</script>

<p>中新网北京826消息:美国常务副国务卿阿米蒂奇抵达北京,准备与中方人员讨论中美领袖10月举行高峰会议等事宜。</p>

<p>外电报道说,阿米蒂奇星期一预计会和中国官员讨论一系列双边和国际课题,其中包括为中国国家主席江泽民在10月访问美国作好准备工作。

</p>

<p>88,中国外交部发言人孔泉就美国常务副国务卿阿米蒂奇访华事回答记者提问时说,经中美双方商定,美国常务副国务卿里查德·阿米蒂奇将于82527日访问中国,与李肇星副外长举行政治磋商。届时双方将就中美关系和共同关心的重大国际及地区问题交换看法。</p>

<div id="ball" style="position: absolute; top: 162; left: 12; width: 6; height: 16">

 

</div>

 

0 Comments

Tue

24

Feb

2009

75、按钮使文字消失

75、按钮使文字消失

脚本说明:

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

<SCRIPT language=javascript event=oninit for=Seq>

 Seq.item('ActionSet1').at(0.000, 'StretchAndDrop('+e.id+')',80, 0.010, 1);

</SCRIPT>

<SCRIPT language=javascript>

function StretchAndDrop(i)

{

// Modify for different effect

    i.Scale(1,1.1,0);    

}

function StretchDrop()

{

    e.SetIdentity();

    Seq.item('ActionSet1').Play();

}

</SCRIPT>

<INPUT onclick=StretchDrop() type=button value="改变字符" name=ShowEffect>

<OBJECT id=e

style="Z-INDEX: -1; LEFT: 0px; WIDTH: 787px; POSITION: absolute; TOP: 50px; HEIGHT: 354px; VISIBLE: "

classid=CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6><PARAM NAME="SourceURL" VALUE="">

<PARAM NAME="CoordinateSystem" VALUE="0">

<PARAM NAME="MouseEventsEnabled" VALUE="0">

<PARAM NAME="HighQuality" VALUE="0">

<PARAM NAME="PreserveAspectRatio" VALUE="-1">

<PARAM NAME="Line0001" VALUE="SetLineColor(255,255,255)">

<PARAM NAME="Line0002" VALUE="SetFillColor(0,0,255,0,0,255)">

<PARAM NAME="Line0003" VALUE="SetFillStyle(1)">

<PARAM NAME="Line0004" VALUE="SetLineStyle(0,0)">

<PARAM NAME="Line0005" VALUE="SetFont('Verdana',20,350,0,0,0)">

<PARAM NAME="Line0006" VALUE="Text('welcome to 7stk.com,thank you!',-20,13)">

</OBJECT></CENTER>

<OBJECT id=Seq style="WIDTH: 2px; HEIGHT: 2px" classid=CLSID:B0A6BAE2-AAF0-11d0-A152-00A0C908DB96></OBJECT>

 

0 Comments

Tue

24

Feb

2009

74、电子文字显示器

74、电子文字显示器

脚本说明:

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

<script language="JavaScript">

 

//____________________CONFIGURATION AREA_______________________________________________

 

 

 

//THIS LED SCRIPT TAKES UP 200 pixels HORIZONTAL and 28 pixels VERTICAL -Have Fun :-)

 

//YOUR MESSAGE GOES ON NEXT 4 LINES DOWN, *ALLOWABLE CHARACTERS ARE: A-Z, Period, space, comma, numerals, question mark and 'message codes'

 

//THE 4 MESSAGE CODES:  (@) - PAUSE FOR 3 SECONDS,  (#) - FLASH FOR 3 SECONDS, (^) - SCROLL UP EFFECT, (_) - SUN EFFECT, ( $ ) - SPLIT EFFECT

 

//EXAMPLE: var message="_  Java^^   ScriptSource!  #  For  the best dhtml scripts...    http://javascript.internet.com    ";

 

 

 

var message="Welcome to 7stk.com,thank you!...   _";   

 

 

 

var LEDonColor='Red';                       //color of the LEDs when they are on

 

var LEDoffColor='#7D0605';               //color of the LEDs when they are off

 

startXPos=(screen.width/2)-100;          //start of horizontal position eg. startXPos=20; places the leds 20 pixels from left

 

startYPos=20;                                    //start of vertical position

 

//____________________END CONFIGURATION AREA_______________________________________________

 

 

 

var IE=(document.all) ? true:false; var NS=(document.layers) ? true:false; var W3C=((document.getElementById) && (!IE)) ? true:false;

 

var d=document; if (window.offscreenBuffering) window.offscreenBuffering = true;

 

function getCSS(id) {

 

       if (IE)     return d.all[id]                   //IE

 

       else if (NS) return d.layers[id]             //NS4

 

       else         return d.getElementById(id)//W3C

 

}

 

var alphabet=new Array(44);

 

alphabet[0]=new Array("0111111","1001000","1001000","1001000","0111111");     alphabet[1]=new Array("1111111","1001001","1001001","1001001","0110110");//B

 

alphabet[2]=new Array("0111110","1000001","1000001","1000001","0100010");    alphabet[3]=new Array("1111111","1000001","1000001","1000001","0111110");//D

 

alphabet[4]=new Array("1111111","1001001","1001001","1001001");                           alphabet[5]=new Array("1111111","1001000","1001000","1001000");//F

 

alphabet[6]=new Array("0111110","1000001","1000001","1001001","0101110");    alphabet[7]=new Array("1111111","0001000","0001000","0001000","1111111");//H

 

alphabet[8]=new Array("1000001","1111111","1000001");                                     alphabet[9]=new Array("0000110","0000001","0000001","0000001","1111110");//J

 

alphabet[10]=new Array("1111111","0001000","0010100","0100010","1000001");  alphabet[11]=new Array("1111111","0000001","0000001","0000001");//L

 

alphabet[12]=new Array("1111111","0010000","0001000","0010000","1111111");    alphabet[13]=new Array("1111111","0010000","0001000","0000100","1111111");//N

 

alphabet[14]=new Array("0111110","1000001","1000001","1000001","0111110");   alphabet[15]=new Array("1111111","1001000","1001000","1001000","0110000");//P

 

alphabet[16]=new Array("0111110","1000001","1000001","1000011","0111111");   alphabet[17]=new Array("1111111","1001000","1001100","1001010","0110001");//R

 

alphabet[18]=new Array("0110010","1001001","1001001","1001001","0100110"); alphabet[19]=new Array("1000000","1000000","1111111","1000000","1000000");//T

 

alphabet[20]=new Array("1111110","0000001","0000001","0000001","1111110");   alphabet[21]=new Array("1110000","0001100","0000011","0001100","1110000");//V

 

alphabet[22]=new Array("1111110","0000001","0000010","0001100","0000010","0000001","1111110"); alphabet[23]=new Array("1100011","0010100","0001000","0010100","1100011");//X

 

alphabet[24]=new Array("1100000","0010000","0001111","0010000","1100000");  alphabet[25]=new Array("1000011","1000101","1001001","1010001","1100001");//Z

 

alphabet[26]=new Array("0000000","0000000","0000000","0000000");                 alphabet[27]=new Array("0000000","0000001","0000000","0000000","0000000");//PERIOD

 

alphabet[28]=new Array("0000000","0000000","1111101","0000000","0000000");//!

 

alphabet[29]=new Array("0100001","1111111","0000001");                                          alphabet[30]=new Array("0100011","1000101","1001001","1001001","0110001");//2

 

alphabet[31]=new Array("0100010","1001001","1001001","1001001","0110110"); alphabet[32]=new Array("0001000","0011000","0101000","1111111","0001000");//4

 

alphabet[33]=new Array("1111001","1001001","1001001","1001001","1000110");  alphabet[34]=new Array("0111110","1001001","1001001","1001001","0100110");//6

 

alphabet[35]=new Array("1000011","1000100","1001000","1110000");                  alphabet[36]=new Array("0110110","1001001","1001001","1001001","0110110");//8

 

alphabet[37]=new Array("0110010","1001001","1001001","1001001","0111110");  alphabet[38]=new Array("0000001","0000010","0000000");//COMMA

 

alphabet[39]=new Array("XXXXXXX");//PAUSE ( @ )

 

alphabet[40]=new Array("YYYYYYY");//FLASH ( # )

 

alphabet[41]=new Array("DDDDDDD");//SCROLL UP EFFECT ( ^ )

 

alphabet[42]=new Array("SSSSSSS");//SUN EFFECT ( _ )

 

alphabet[43]=new Array("0100000","1000000","1001101","1001000","0110000");//?

 

alphabet[44]=new Array("QQQQQQQ");//SPLIT EFFECT ( $ )

 

 

 

message=message.toUpperCase();                              //make message uppercase

 

var messageArray=new Array();                                //make messageArray-an array of the letters in the message

 

var columnCount=0;                                                      //variable to count columns in messageArray.length

 

for (i=0; i<message.length; i++){                       //iterate through the characters in the message

 

       letterNum=message.charCodeAt(i);                    //assign proper letter code (alphabet array)

 

       if ((letterNum>=65) && (letterNum<=90)) temp=letterNum-65; //letters

 

       else if (letterNum==46) temp=27;               //.

 

       else if (letterNum==32) temp=26;               //space

 

       else if (letterNum==33) temp=28;               //!

 

       else if ((letterNum>=49) && (letterNum<=57)) temp=letterNum-20;       //[1-9]

 

       else if (letterNum==48) temp=14;               //zero

 

       else if (letterNum==63) temp=43;               //?

 

       else if (letterNum==44) temp=38;               //,

 

       else if (letterNum==64) temp=39;               //pause

 

       else if (letterNum==35) temp=40;               //flash effect

 

       else if (letterNum==94) temp=41;               //scroll up effect

 

       else if (letterNum==95) temp=42;               //sunrise effect

 

       else if (letterNum==36) temp=44;               //split effect

 

       else continue;

 

       for (ii=0; ii<alphabet[temp].length;ii++){ messageArray[columnCount]=alphabet[temp][ii];columnCount++;}

 

       if ((temp!=39) && (temp!=40) && (temp!=41)) {messageArray[columnCount]="0000000";columnCount++;}

 

}

 

//make 'led screen' with block 0-49 on row 1, block 50-99 on row 2, block 100-149 on row 3, etc..

 

var b='';

 

for (var i=0; i<350; i++){//columns 50 columns x 7 rows

 

       rowPos=0+3*(i>49)+3*(i>99)+3*(i>149)+3*(i>199)+3*(i>249)+3*(i>299);

 

       colPos=0+150*(i>49)+150*(i>99)+150*(i>149)+150*(i>199)+150*(i>249)+150*(i>299);

 

       b+= (NS) ? '<LAYER NAME="block' + i + '" LEFT="' + (startXPos+i*3-colPos) + '" TOP="' + (startYPos+rowPos) + '" VISIBILITY="show" WIDTH="2" HEIGHT="2" BGCOLOR="' + LEDoffColor + '"></LAYER>' : '<div id="block' + i + '" style="position:absolute; left:' + (startXPos+i*3-colPos) + 'px; top:' + (startYPos+rowPos) + 'px; background-color:' + LEDoffColor +'; height: 2px; width: 2px;font-size:2px;"></div>';

 

}

 

document.write(b);

 

var columnCounter=0; //keep track of postion of messageArray

 

var bb=new Array();             //store particular LED's dom element here

 

       if (NS) { for (var i=0; i<350; i++) { bb[i]=getCSS("block"+i)}}

 

       else {for (var i=0; i<350; i++){ bb[i]=getCSS("block"+i).style;}}

 

var isOn=new Array();for (var i=0; i<350; i++){ isOn[i]=0;}    //keep track on on/off status of particular LED

 

onArray=new Array(); var onCount=0; //array size counter

 

function scroll(){

 

       onCount=0;

 

       if (NS) { for (var i=0; i<301; i+=50){ if (isOn[i]==1) { bb[i].bgColor=LEDoffColor; isOn[i]=0;} for (var ii=1; ii<50; ii+=7){

 

                            temp=i+ii;temp1=temp+1;temp2=temp+2;temp3=temp+3;temp4=temp+4;temp5=temp+5;temp6=temp+6;

 

                            if (isOn[temp]==1) {bb[temp].bgColor=LEDoffColor;  isOn[temp]=0; bb[temp-1].bgColor=LEDonColor; isOn[temp-1]=1;}

 

                            if (isOn[temp1]==1) {bb[temp1].bgColor=LEDoffColor;  isOn[temp1]=0; bb[temp].bgColor=LEDonColor; isOn[temp]=1;}

 

                            if (isOn[temp2]==1) {bb[temp2].bgColor=LEDoffColor;  isOn[temp2]=0; bb[temp+1].bgColor=LEDonColor; isOn[temp+1]=1;}

 

                            if (isOn[temp3]==1) {bb[temp3].bgColor=LEDoffColor;  isOn[temp3]=0; bb[temp2].bgColor=LEDonColor; isOn[temp2]=1;}

 

                            if (isOn[temp4]==1) {bb[temp4].bgColor=LEDoffColor;  isOn[temp4]=0; bb[temp3].bgColor=LEDonColor; isOn[temp3]=1;}

 

                            if (isOn[temp5]==1) {bb[temp5].bgColor=LEDoffColor;  isOn[temp5]=0; bb[temp4].bgColor=LEDonColor; isOn[temp4]=1;}

 

                            if (isOn[temp6]==1) {bb[temp6].bgColor=LEDoffColor;  isOn[temp6]=0; bb[temp5].bgColor=LEDonColor; isOn[temp5]=1;}

 

       }}}

 

       else { for (var i=0; i<301; i+=50){ if (isOn[i]==1) { bb[i].backgroundColor=LEDoffColor; isOn[i]=0;} for (var ii=1; ii<50; ii+=7){

 

                            temp=i+ii;temp1=temp+1;temp2=temp+2;temp3=temp+3;temp4=temp+4;temp5=temp+5;temp6=temp+6;

 

                            if (isOn[temp]==1) {bb[temp].backgroundColor=LEDoffColor;  isOn[temp]=0; bb[temp-1].backgroundColor=LEDonColor; isOn[temp-1]=1;}

 

                            if (isOn[temp1]==1) {bb[temp1].backgroundColor=LEDoffColor;  isOn[temp1]=0; bb[temp].backgroundColor=LEDonColor; isOn[temp]=1;}

 

                            if (isOn[temp2]==1) {bb[temp2].backgroundColor=LEDoffColor;  isOn[temp2]=0; bb[temp+1].backgroundColor=LEDonColor; isOn[temp+1]=1;}

 

                            if (isOn[temp3]==1) {bb[temp3].backgroundColor=LEDoffColor;  isOn[temp3]=0; bb[temp2].backgroundColor=LEDonColor; isOn[temp2]=1;}

 

                            if (isOn[temp4]==1) {bb[temp4].backgroundColor=LEDoffColor;  isOn[temp4]=0; bb[temp3].backgroundColor=LEDonColor; isOn[temp3]=1;}

 

                            if (isOn[temp5]==1) {bb[temp5].backgroundColor=LEDoffColor;  isOn[temp5]=0; bb[temp4].backgroundColor=LEDonColor; isOn[temp4]=1;}

 

                            if (isOn[temp6]==1) {bb[temp6].backgroundColor=LEDoffColor;  isOn[temp6]=0; bb[temp5].backgroundColor=LEDonColor; isOn[temp5]=1;}

 

       }}}

 

       temp=messageArray[columnCounter]; flag=temp.charAt(0);//GET NEW COLUMN

 

       if (temp.charAt(1)=="1") {isOn[99]=1;} if (temp.charAt(2)=="1") {isOn[149]=1} if (temp.charAt(3)=="1") {isOn[199]=1}

 

       if (temp.charAt(4)=="1") {isOn[249]=1} if (temp.charAt(5)=="1") {isOn[299]=1} if (temp.charAt(6)=="1") {isOn[349]=1}

 

       if (flag=="0") {} else if (flag=="1") {isOn[49]=1;} else if (flag=="X") {pauseScroll();} else if (flag=="Y") {flashScroll();}

 

       else if (flag=="D") {dropEffect();} else if (flag=="S") {sunRiseEffect();} else if (flag=="Q") {splitEffect();}

 

       columnCounter++; if(columnCounter==columnCount) columnCounter=0;

 

}

 

//______________pause effect________________

 

function pauseScroll(){ clearInterval(loop); setTimeout("init()",3000);}

 

//______________onArray Section_____________

 

onArray=new Array(); var onCount=0; //array size counter

 

function makeOnArray(){ clearInterval(loop); onCount=0; for (var i=0; i<700; i++){if (isOn[i]==1) {onArray[onCount]=i; onCount++;};}//make onArray of 'on' LEDS

 

}//_________________________________

 

//_______________flash effect_______________

 

var flashCount=0;

 

function flashScroll(){   makeOnArray(); flashCount=0; if (NS) {setTimeout("flashItNS()",250);} else {setTimeout("flashIt()",250);}}

 

function flashItNS(){ flashCount++;

 

       if (flashCount<14) {

 

              if (flashCount % 2 == 0){ for (var i=0; i<onCount; i++){ isOn[onArray[i]]=0;bb[onArray[i]].bgColor=LEDoffColor;}}

 

              else {for (var i=0; i<onCount; i++){isOn[onArray[i]]=1;bb[onArray[i]].bgColor=LEDonColor;}}

 

              setTimeout("flashItNS()",250);

 

       }    

 

       else {flashCount=0; setTimeout("init()",250);}

 

}

 

function flashIt(){ flashCount++;

 

       if (flashCount<14) {

 

              if (flashCount % 2 == 0){ for (var i=0; i<onCount; i++){ isOn[onArray[i]]=0;bb[onArray[i]].backgroundColor=LEDoffColor;}}

 

              else {for (var i=0; i<onCount; i++){isOn[onArray[i]]=1;bb[onArray[i]].backgroundColor=LEDonColor;}}

 

              setTimeout("flashIt()",250);

 

       }    

 

       else {flashCount=0; setTimeout("init()",250);}

 

}//_________________________________

 

//____________scroll up effect______________

 

dropArray=new Array();

 

function dropEffect(){makeOnArray(); for (var i=0; i<onCount; i++){ dropArray[i]=onArray[i]; } if (NS) {dropItNS();} else {dropIt();}}

 

var dropCount=0;

 

function dropItNS(){

 

       if (dropCount<7){for (var i=0; i<onCount; i++){       bb[dropArray[i]].bgColor=LEDoffColor; }

 

              for (var i=0; i<onCount; i++){ temp=dropArray[i]; temp-=50;if (temp<0) temp+=350;bb[temp].bgColor=LEDonColor; dropArray[i]=temp;}

 

              dropCount++; setTimeout("dropItNS()",100);

 

       } else {dropCount=0;setTimeout("init()",100);}

 

}//_________________________________

 

function dropIt(){

 

       if (dropCount<7){ for (var i=0; i<onCount; i++){ bb[dropArray[i]].backgroundColor=LEDoffColor; }

 

              for (var i=0; i<onCount; i++){ temp=dropArray[i]; temp-=50; if (temp<0) temp+=350; bb[temp].backgroundColor=LEDonColor; dropArray[i]=temp;}

 

              dropCount++; setTimeout("dropIt()",100);

 

       } else {dropCount=0;setTimeout("init()",100);}

 

}//_________________________________

 

//____________sunrise effect________________

 

sunRiseCounter=0;sunRiseArray=new Array();

 

sunRiseArray[0]=new Array(50,101,102,103,154,155,156,207,208,259,260,261,212,163,164,115,116,117,168,169,170,221,222,223,274,275,276,227,228,179,180,131,132,83,134,135,186,187,238,239,240,241,292,293,344,295,296,247,198);//Hills

 

sunRiseArray[1]=new Array(224,225,226); sunRiseArray[2]=new Array(174,175,176,177); sunRiseArray[3]=new Array(173,124,125,126,127,128,178); sunRiseArray[4]=new Array(172,123,74,75,76,77,129); sunRiseArray[5]=new Array(171,122,73,24,25,26,27,78,79,130);

 

function sunRiseEffect() { makeOnArray(); for (var i=0; i<onCount; i++){ isOn[onArray[i]]=0; if (!NS) {bb[onArray[i]].backgroundColor=LEDoffColor;}     else {bb[onArray[i]].bgColor=LEDoffColor;}}

 

       setTimeout("riseEffectUp()",1000);}

 

function riseEffectUp() {

 

       if (!NS) { for (var ii=0; ii<sunRiseArray[sunRiseCounter].length; ii++) {isOn[sunRiseArray[sunRiseCounter][ii]]=1;bb[sunRiseArray[sunRiseCounter][ii]].backgroundColor=LEDonColor;}}

 

       else {for (var ii=0; ii<sunRiseArray[sunRiseCounter].length; ii++) {isOn[sunRiseArray[sunRiseCounter][ii]]=1;bb[sunRiseArray[sunRiseCounter][ii]].bgColor=LEDonColor;}}

 

       sunRiseCounter++; if (sunRiseCounter>5) {sunRiseCounter=5;setTimeout("riseEffectDown()",2000);}  else {setTimeout("riseEffectUp()",250);}}

 

function riseEffectDown() {

 

       if (!NS) {for (var ii=0; ii<sunRiseArray[sunRiseCounter].length; ii++) {isOn[sunRiseArray[sunRiseCounter][ii]]=0;bb[sunRiseArray[sunRiseCounter][ii]].backgroundColor=LEDoffColor;}}

 

       else {for (var ii=0; ii<sunRiseArray[sunRiseCounter].length; ii++) {isOn[sunRiseArray[sunRiseCounter][ii]]=0;bb[sunRiseArray[sunRiseCounter][ii]].bgColor=LEDoffColor;}}

 

       sunRiseCounter--; if (sunRiseCounter<1) {sunRiseCounter=0;setTimeout("init()",1500);}

 

       else {setTimeout("riseEffectDown()",250);}

 

}//____________________________________

 

//____________split scroll effect___________

 

var splitCount=0;

 

function splitEffect() { makeOnArray(); for (var i=0; i<onCount; i++) { dropArray[i]=onArray[i]; }

 

       if (NS) {setTimeout("splitNS()",55);} else if (IE) {setTimeout("splitIt()",55);} else {setTimeout("splitIt()",100);}

 

}

 

function splitIt(){ for (i=0;i<onCount;i++){ temp=dropArray[i];

 

       if (temp<150) { if (temp==100) {bb[temp].backgroundColor=LEDoffColor; temp=149; bb[temp-1].backgroundColor=LEDonColor;}

 

                     else if (temp==50) {bb[temp].backgroundColor=LEDoffColor; temp=99; bb[temp-1].backgroundColor=LEDonColor;}

 

                     else if (temp==0) {bb[temp].backgroundColor=LEDoffColor; temp=49; bb[temp-1].backgroundColor=LEDonColor;}

 

                     else {bb[temp].backgroundColor=LEDoffColor; bb[temp-1].backgroundColor=LEDonColor;}

 

                     dropArray[i]=temp-1; }

 

              else { if (temp==199) {bb[temp].backgroundColor=LEDoffColor; temp=200; bb[temp+1].backgroundColor=LEDonColor;}

 

                     else if (temp==349) {bb[temp].backgroundColor=LEDoffColor; temp=300; bb[temp+1].backgroundColor=LEDonColor;}

 

                     else if (temp==299) {bb[temp].backgroundColor=LEDoffColor; temp=250; bb[temp+1].backgroundColor=LEDonColor;}

 

                     else if (temp==249) {bb[temp].backgroundColor=LEDoffColor; temp=200; bb[temp+1].backgroundColor=LEDonColor;}

 

                     else {bb[temp].backgroundColor=LEDoffColor; bb[temp+1].backgroundColor=LEDonColor;}

 

                     dropArray[i]=temp+1; }

 

      } splitCount++; if (splitCount<49) {if (IE) {setTimeout("splitIt()",55);} else {setTimeout("splitIt()",100);} } else {splitCount=0; init();}

 

}

 

function splitNS(){

 

       for (i=0;i<onCount;i++){ temp=dropArray[i];

 

              if (temp<150) { if (temp==100) {bb[temp].bgColor=LEDoffColor; temp=149; bb[temp-1].bgColor=LEDonColor;}

 

                     else if (temp==50) {bb[temp].bgColor=LEDoffColor; temp=99; bb[temp-1].bgColor=LEDonColor;}

 

                     else if (temp==0) {bb[temp].bgColor=LEDoffColor; temp=49; bb[temp-1].bgColor=LEDonColor;}

 

                     else {bb[temp].bgColor=LEDoffColor; bb[temp-1].bgColor=LEDonColor;}

 

                     dropArray[i]=temp-1; }

 

              else { if (temp==199) {bb[temp].bgColor=LEDoffColor; temp=200; bb[temp+1].bgColor=LEDonColor;}

 

                     else if (temp==349) {bb[temp].bgColor=LEDoffColor; temp=300; bb[temp+1].bgColor=LEDonColor;}

 

                     else if (temp==299) {bb[temp].bgColor=LEDoffColor; temp=250; bb[temp+1].bgColor=LEDonColor;}

 

                     else if (temp==249) {bb[temp].bgColor=LEDoffColor; temp=200; bb[temp+1].bgColor=LEDonColor;}

 

                     else {bb[temp].bgColor=LEDoffColor; bb[temp+1].bgColor=LEDonColor;}

 

                     dropArray[i]=temp+1; }

 

       } splitCount++; if (splitCount<49) {setTimeout("splitNS()",55);} else {splitCount=0; init();}

 

}//___________________________________

 

function init(){ if (NS) {loop=setInterval("scroll()",55);} else if (IE){loop=setInterval("scroll()",55);} else {loop=setInterval("scroll()",100);}}

</script>

 

 

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

<body  onLoad="init()">

 

0 Comments

Tue

24

Feb

2009

73、快速滚动的文字

73、快速滚动的文字

脚本说明:

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

<script language="JavaScript1.2">

 

/*

Cross browser Marquee script- ?Dynamic Drive (www.dynamicdrive.com)

For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com

Credit MUST stay intact

*/

 

//Specify the marquee's width (in pixels)

var marqueewidth=300

//Specify the marquee's height

var marqueeheight=25

//Specify the marquee's marquee speed (larger is faster 1-10)

var marqueespeed=3

//configure background color:

var marqueebgcolor="#EAEAEA"

//Pause marquee onMousever (0=no. 1=yes)?

var pauseit=1

 

//Specify the marquee's content (don't delete <nobr> tag)

//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

 

var marqueecontent='<nobr><font face="Arial">欢迎光临 <a href="http://www.7stk.com">www.7stk.com</a>这里有网上最丰富的javascript资源,还有LOGO,教程,flash,字体等各种内容下载!</font></nobr>'

 

 

////NO NEED TO EDIT BELOW THIS LINE////////////

 

var copyspeed=marqueespeed

var pausespeed=(pauseit==0)? copyspeed: 0

var iedom=document.all||document.getElementById

if (iedom)

document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-1000">'+marqueecontent+'</span>')

var actualwidth=''

var cross_marquee, ns_marquee

 

function populate(){

if (iedom){

cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee

cross_marquee.style.left=marqueewidth+8

cross_marquee.innerHTML=marqueecontent

actualwidth=document.all? cross_marquee.offsetWidth : document.getElementById("temp").offsetWidth

}

else if (document.layers){

ns_marquee=document.ns_marquee.document.ns_marquee2

ns_marquee.left=marqueewidth+8

ns_marquee.document.write(marqueecontent)

ns_marquee.document.close()

actualwidth=ns_marquee.document.width

}

lefttime=setInterval("scrollmarquee()",20)

}

window.onload=populate

 

function scrollmarquee(){

if (iedom){

if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))

cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed

else

cross_marquee.style.left=marqueewidth+8

 

}

else if (document.layers){

if (ns_marquee.left>(actualwidth*(-1)+8))

ns_marquee.left-=copyspeed

else

ns_marquee.left=marqueewidth+8

}

}

 

if (iedom||document.layers){

with (document){

document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')

if (iedom){

write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')

write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')

write('<div id="iemarquee" style="position:absolute;left:0;top:0"></div>')

write('</div>')

}

else if (document.layers){

write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')

write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')

write('</ilayer>')

}

document.write('</td></table>')

}

}

</script>

 

0 Comments

Tue

24

Feb

2009

72、文字放大缩小

72、文字放大缩小

脚本说明:

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

<script language="JavaScript"> 

<!-- 

 

function MM_reloadPage(init) { //reloads the window if Nav4 resized 

if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { 

document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} 

else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); 

} 

MM_reloadPage(true); 

 

var fsize=12; 

var dx; 

var n; 

 

function changesize(c) { 

if (c==1) { 

if (fsize>0) {fsize--;} 

else {} 

} 

else {fsize++;} 

fonts.innerHTML = fsize + 'px'; 

content.style.fontSize=fsize; 

} 

 

function dragslide() { 

if (n==1) { 

var x=document.body.scrollLeft+event.clientX; 

if ((x-dx)<102&&(x-dx)>0) 

{ 

handle.style.left=x-dx; 

fsize=x-dx+11; 

} 

else if ((x-dx)>101) { 

handle.style.left=101; 

fsize=112; 

} 

else if ((x-dx)<1) { 

handle.style.left=1; 

fsize=12; 

} 

fonts.innerHTML = fsize + 'px'; 

content.style.fontSize=fsize; 

} 

} 

 

function dragstart() { 

n=1; 

dx=document.body.scrollLeft+event.clientX-handle.offsetLeft; 

handle.setCapture(); 

} 

 

function dragend() { 

n=0; 

handle.releaseCapture(); 

} 

//--> 

</script> 

<style type="text/css"> 

<!-- 

.button { height: 14px; width: 14px; font-size: 12px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 10px}  

.border { border-color: #000000 black; border-style: solid; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px} 

.shadow { filter: DropShadow(Color=#000000, OffX=2, OffY=1, Positive=1)} 

--> 

</style> 

<table width="500" border="0" cellspacing="0" cellpadding="0"> 

<tr> 

<td width="14" height="14"> 

<input type="button" name="Button" value="-" onClick=changesize(1) class="button" onfocus="this.blur()"> 

 

</td> 

<td width="112"> 

<div id="bar" style="font-size:5px;position:relative; width:112px; height:11px; z-index:1; background-color: #D4D0C8; layer-background-color: #D4D0C8; border: 1px none #000000; left: 0px; top: 3px ; " > 

<div id="handle" style="font-size:12px;color:#CDC9C0;cursor: w-resize;position:absolute; width:8px; height:9px; z-index:1; top: 6px; left: 1px" class="shadow" onmousedown="dragstart()" onmousemove="dragslide()" onmouseup="dragend()"></div> 

</div> 

</td> 

<td width="14"> 

<input type="button" name="Submit2" value="+" onClick=changesize(2) class="button" onfocus="this.blur()"> 

</td> 

<td valign="bottom"><span id="fonts" style="font-size:12px;">12px</span></td> 

</tr> 

</table> 

<br> 

<table width="500" border="0" cellspacing="0" cellpadding="0"> 

 

<tr> 

<td id="content" style="font-size:12px">欢迎7stk.com</td> 

</tr> 

</table> 

 

0 Comments

Tue

24

Feb

2009

71、隐现变化的超酷文字

71、隐现变化的超酷文字

脚本说明:

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

<STYLE>

  DIV {width: 609; font-size: 40pt; font-family: Tahoma;font-weight: bold;}

</STYLE>

<SCRIPT LANGUAGE="JavaScript">

var count=0; var thePhase=0; var aniOn=0;

var theStrength=0;var maxCount=40;var maxStrength=100;var theCount=0;

var colorList=new Array("red", "blue", "green");

var   oDiv=null;

var oQueue=new Array();

function doStart(obj)

{

       oDiv=obj;

       oQueue.push("Welcome to 7stk.com");

       oQueue.push("Please stay here");

       oQueue.push("I love you");

       if(obj==null)return;

       if(!oQueue.length)return;

       oDiv.innerHTML=oQueue.shift();

       var ctrlRng=document.body.createControlRange()

       ctrlRng.add(oDiv)

       ctrlRng.select();

       ctrlRng.execCommand("SelectAll")

    theCount=0;

       doFilt();

}

 

function getStrength(pos)

{

       var   ret=0

       if(pos<maxCount)

       {

              ret=maxStrength*pos*pos/(maxCount*maxCount);

       }

       else if(pos==maxCount)

       {

              strNext=oQueue.shift()

              oDiv.innerHTML=strNext;

              rndNum=Math.floor(Math.random() * 3)

              oDiv.style.filter+="glow(color=" +  colorList[rndNum] + ", strength=5)"

              ret=maxStrength;

       }

       else if(pos<2*maxCount)

       {

              pos=2*maxCount-pos;

              ret=maxStrength*pos*pos/(maxCount*maxCount);

       }

       else

              ret=0;

       ret=Math.ceil(ret)

       return ret;

}

 

function anitext(){

  thePhase=(thePhase + 10)

  oDiv.filters[0].phase=thePhase

  theStrength=getStrength(++theCount);

  window.status=theStrength

  if(theStrength==0)theCount=0;

 

  if(oQueue.length>0 || theStrength>0)

  {

    oDiv.filters[0].strength=theStrength;

    oTO=window.setTimeout("anitext()",0200,"JavaScript")

  }

}

 

function doFilt(){

  oDiv.style.filter="wave(add=0, freq=3, lightstrength=50, phase=0, strength=2, enabled=1); "

  rndNum=Math.floor(Math.random() * 3)

  oDiv.style.filter+="glow(color=" +  colorList[rndNum] + ", strength=5)"

  anitext()

}

 

function removeFilt(){

  window.clearTimeout(oTO)

  oDiv.style.filter=" "

}

 

function arrPush(item)

{

       this[this.length]=item;

}

 

function arrShift()

{

       var item=this[0];

       var nLen=this.length;

       for(var i=0;i<nLen-1;i++)

              this[i]=this[i+1];

       this.length--;

       return item;

}

 

Array.prototype.push=arrPush;

Array.prototype.shift=arrShift;

 

</SCRIPT>

<DIV ID="MyDiv" align="center">

</DIV>

 

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

<body  onload="doStart(MyDiv)">

 

0 Comments

Tue

24

Feb

2009

70、颜色变化的欢迎词

70、颜色变化的欢迎词

脚本说明:

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

<Script language="JavaScript">

 

var someText = "Welcome to www.7stk.com";     // the text

var aChar;

var aSentence;

var i=0;                               // a counter

 

var colors = new Array("FF0000","FFFF66","FF3399","00FFFF","FF9900","00FF00"); // the colors

var aColor;                                 // the chosen color

 

function loadText()

{

       // randomly choose color

       aColor = colors[Math.floor(Math.random()*colors.length)];

 

       aChar = someText.charAt(i);

       if (i == 0)

              aSentence = aChar;

       else

              aSentence += aChar;     

 

       // 50 iterations max.

       if (i < 50)       i++;

      

       // For IE

       if (document.all)

       {

              textDiv.innerHTML= "<font color='#"+aColor+"' face='Tahoma' size='5'><i>"+aSentence+"</i></font>";

              setTimeout("loadText()",100);

       }

             

       // For Netscape Navigator 4

       else if (document.layers)

       {

              document.textDiv.document.write("<font color='#"+aColor+"' face='Tahoma'                                                    size='5'><i>"+aSentence+"</i></font>");

              document.textDiv.document.close();

              setTimeout("loadText()",100);

       }

             

       // For other

       else if (document.getElementById)

       {

              document.getElementById("textDiv").innerHTML = "<font color='#"+aColor+"'                  face='Tahoma'size='5'><i>"+aSentence+"</i></font>";

              setTimeout("loadText()",100);

       }

}

</SCRIPT>

<div id="textDiv"></div>

 

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

<body  onLoad="loadText()">

 

0 Comments

Tue

24

Feb

2009

69、输入框字体的控制

69、输入框字体的控制

脚本说明:

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

<select id='fontslt' onchange='NYSfont()'><option>选择阅读字体

<script language=javascript>

for (i=9;i<200;i++)

{document.write("<option value="+i+">"+i+"pt字体\n");}

function NYSfont()

{if((fontslt.selectedIndex!=-1)&&(fontslt.selectedIndex!=0)){readcontent.style.fontSize=fontslt.options[fontslt.selectedIndex].value;}}

</script></select>

 

<p>

<textarea id='readcontent' rows="15" cols="100">这里的字体应该随选择变化

 

0 Comments

Tue

24

Feb

2009

68、文字闪烁显示

68、文字闪烁显示

脚本说明:

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

<SCRIPT language=JavaScript>    

<!--

text = "『网页特效代码』 http://www.7stk.com"; //显示的文字    

color1 = "black"; //文字的颜色    

color2 = "white"; //转换的颜色    

fontsize = "3"; //字体大小    

speed = 100; //转换速度 (1000 = 1 )      

i = 0;    

if (navigator.appName == "Netscape") {    

document.write("<layer id=a visibility=show></layer><br><br><br>");    

}    

else {    

document.write("<div id=a></div>");    

}    

function changeCharColor() {    

if (navigator.appName == "Netscape") {    

document.a.document.write("<center><font face=arial ><font color=" + color1 +     

">");    

for (var j = 0; j < text.length; j++) {    

if(j == i) {    

document.a.document.write("<font face=arial color=" + color2 + ">" + Text.charAt(i) + "</font>");    

}    

else {    

document.a.document.write(text.charAt(j));    

}    

}    

document.a.document.write('</font></font></center>');    

document.a.document.close();    

}    

if (navigator.appName == "Microsoft Internet Explorer") {    

str = "<font face=arial><font color=" + color1 + ">";    

for (var j = 0; j < text.length; j++) {    

if( j == i) {    

str += "<font face=arial color=" + color2 + ">" + text.charAt(i) + "</font>";    

}    

else {    

str += text.charAt(j);    

}    

}    

str += "</font></font>";    

a.innerHTML = str;    

}    

(i == text.length) ? i=0 : i++;    

}    

setInterval("changeCharColor()", speed);    

-->    

</SCRIPT>

 

0 Comments

Tue

24

Feb

2009

67、文字反复显示

67、文字反复显示

脚本说明:

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

<SCRIPT>

<!--

var message="网页特效代码 http://www.7stk.com"

var n=0;

if (document.all){

document.write('<font size="12px" color="#000000">')

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

document.write('<span id="neonlight" style="font-size:12px">'+message.charAt(m)+'</span>')

document.write('</font>')

var tempref=document.all.neonlight

}

else

document.write(message)

function neon(){

if (n==0){

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

tempref[m].style.color="#000000"

}

tempref[n].style.color="#FFFFFF"

if (n<tempref.length-1)

n++

else{

n=0

clearInterval(flashing)

setTimeout("beginneon()",1500)

return

}

}

function beginneon(){

if (document.all)

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

}

beginneon()

-->

</SCRIPT>

 

0 Comments

Tue

24

Feb

2009

66、长篇文章的处理

66、长篇文章的处理

脚本说明:

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

<style type="text/css">

#divUp   {position:absolute; left:170px; top:190px;}

#divDown {position:absolute; left:170px; top:380px;}

#divScrollTextCont {position:absolute; left:170px; top:220px; width:300px; height:150px; clip:rect(0px 300px 150px 0px); overflow:hidden; visibility:hidden;}

#divText {position:absolute; left:0px; top:0px;}

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

 

 

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

 

You set the width and height of the divs inside the style tag, you only have to

change the divScrollTextCont, Remember to set the clip the same as the width and height.

You can remove the divUp and divDown layers if you want.

This script should also work if you make the divScrollTextCont position:relative.

Then you should be able to place this inside a table or something. Just remember

that Netscape crash very easily with relative positioned divs and tables.

 

Updated with a fix for error if moving over layer before pageload.

 

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

 

 

//If you want it to move faster you can set this lower, it's the timeout:

var speed = 30

 

//Sets variables to keep track of what's happening

var loop, timer

 

//Object constructor

function makeObj(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.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight

       this.up=goUp;this.down=goDown;

       this.moveIt=moveIt; this.x=0; this.y=0;

    this.obj = obj + "Object"

    eval(this.obj + "=this")

    return this

}

 

// A unit of measure that will be added when setting the position of a layer.

var px = bw.ns4||window.opera?"":"px";

 

function moveIt(x,y){

       this.x = x

       this.y = y

       this.css.left = this.x+px

       this.css.top = this.y+px

}

 

//Makes the object go up

function goDown(move){

       if (this.y>-this.scrollHeight+oCont.clipHeight){

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

                     if (loop) setTimeout(this.obj+".down("+move+")",speed)

       }

}

//Makes the object go down

function goUp(move){

       if (this.y<0){

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

              if (loop) setTimeout(this.obj+".up("+move+")",speed)

       }

}

 

//Calls the scrolling functions. Also checks whether the page is loaded or not.

function scroll(speed){

       if (scrolltextLoaded){

              loop = true;

              if (speed>0) oScroll.down(speed)

              else oScroll.up(speed)

       }

}

 

//Stops the scrolling (called on mouseout)

function noScroll(){

       loop = false

       if (timer) clearTimeout(timer)

}

//Makes the object

var scrolltextLoaded = false

function scrolltextInit(){

       oCont = new makeObj('divScrollTextCont')

       oScroll = new makeObj('divText','divScrollTextCont')

       oScroll.moveIt(0,0)

       oCont.css.visibility = "visible"

       scrolltextLoaded = true

}

//Call the init on page load if the browser is ok...

if (bw.bw) onload = scrolltextInit

</script>

<div id="divUp">

       <a href="#" onmouseover="scroll(-2)" onmouseout="noScroll()" onclick="return false">[慢速]</a>

       <a href="#" onmouseover="scroll(-7)" onmouseout="noScroll()" onclick="return false">[中速]</a>

       <a href="#" onmouseover="scroll(-10)" onmouseout="noScroll()" onclick="return false">[快速]</a>

</div>

 

<div id="divDown">

       <a href="#" onmouseover="scroll(2)" onmouseout="noScroll()" onclick="return false">[慢速]</a>

       <a href="#" onmouseover="scroll(7)" onmouseout="noScroll()" onclick="return false">[中速]</a>

       <a href="#" onmouseover="scroll(10)" onmouseout="noScroll()" onclick="return false">[快速]</a>

</div>

 

<div id="divScrollTextCont">

       <div id="divText">

              <p>新闻: <br>

<br>    在主场击败灰熊之前,快船已经在他们之前9场的比赛当中输掉了8场,即便是大话连篇的主教练金特里也不得不承认这是他在教练生涯里所经历的最为黯淡的时刻。但是即便是这样严重的危机也没有触动金特里固执的神经,在主场击败灰熊之后,金特里又感觉良好地走在了老路上。金特里必须知道:“一场胜利并不意味着情况得到了扭转,不断下沉的快船有太多的窟窿要紧急修补。”

 

<br>    即使只从数据上来看,快船的退步也是十分明显的,他们的平均得分已经从每场95.7分下降到92.5分,命中率从43.8%下降到43.3%,篮板数从每场43.5个下降到41.7个,快船队的技术统计在全面下降,当然也有一些数据在升高,比如失误数,他们现在平均每场比赛失误16.5次。

 

<br>    金特里直到现在还在坚持,一旦快船队的主力球员能够从伤病中康复,一旦他能够重新拥有全部的队员,一切都会重归平静,快船队又会成为一支实力不俗的强队。他的全部论断都是建立在快船队这个赛季仅有的几场拿的出手的胜利。比如他们战胜活塞,击败马刺,以及两胜火箭。

 

<br>    我必须说我同意金特里的部分观点,那就是这支球队的确充满了潜力,而且的确有很多货真价实的天才。但是要知道,在这个联盟之中,同样充满潜力的球队并不在少数,偶尔的一场漂亮胜利,任何一支球队都能够取得,问题的关键是能否持续稳定地表现出较高地竞技水准。快船有足够的条件让自己成为一支强队,前提是他们必须找到正确的方法。

 

<br>    米勒是一个关键性的球员,因为伤病而只在本赛季出场六次的小前锋奥多姆也同样是一个不可多得的天才。奥洛沃坎迪也是一个处在上升期的优秀球员,但是球队糟糕的战绩能否留住他可是一个大大的问号。理查德森、马格特、皮亚考斯基、贾里奇都是能够用的上的球员,还有投手的问题,快船糟糕的命中率不是他们缺乏投手造成的,可以信赖的中国球员王治郅在大部分时间里,都被金特里放在了板凳上。他有足够优秀的才能来为快船队出力,但是前提是金特里必须意识到这一点。

 

<br>    如果让我坦率地讲出我对这支球队目前的印象的话,可能会让金特里有些难受。快船队在进攻的时候热衷于单打独斗,在防守的时候又站位稀松,他们没有一丝一毫地成为金特里所说的“强大球队”的迹象。明白地说如果他们不立刻修补他们自己的窟窿的话,船会沉的。

 

<br>    如果金特里仍然梦想带领快船跻身季后赛的话,他就必须在剩下的比赛中取得28场以上的胜利。这个目标显然让更多的人相信,他们已经和季后赛说再见了,但是即使如此,对于这支年轻的球队来说,在未来的比赛当中表现出一支季后赛球队应该具备的水准仍然是十分必要的。因为这样他们至少还能拥有尊严。

 

<br>    在受伤的球员逐渐回归主力阵容之后,快船队在实力上显然已经具备了取得佳绩的条件,在这种情况下,主教练金特里能否正确地运用他的球队就成为了快船队能否前进的关键。

 

<br>    金特里首先要做的就是改进球队的防守,如果不能够限制住对手的得分,尤其遏制住对手的快攻,快船队要想取得理想的战绩就会变得十分的艰难。此外还有投手的问题,金特里必须解决,那些认为有一两个主力队员回归之后,得分就会大幅度增加的想法过于天真。金特里必须明白有太多的事情需要他去改变,如果他还有欲望去取得胜利。(飞鹰编译)

</p>

       </div>

</div>

 

0 Comments

Tue

24

Feb

2009

65、多篇文章的处理

65、多篇文章的处理

脚本说明:

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

<style type="text/css">

#divControl {position:absolute; left:370px; top:190px; width:250px; font-size:10pt; font-family:arial,helvetica,sans-serif; visibility:hidden;}

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

.clScroll   {position:absolute; font-size:10pt; font-family:arial,helvetica,sans-serif; 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

}

 

// A unit of measure that will be added when setting the position of a layer.

var px = bw.ns4||window.opera?"":"px";

 

//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)+px

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

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

      

       // You can add and remove scrollObjects here.

       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.left = 0+px

       oScroll[0].css.top = 0+px

       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); return false">第一页</a>

       <a href="#" onclick="changeActive(1); return false">第二页</a>

       <a href="#" onclick="changeActive(2); return false">第三页</a>

       <a href="#" onclick="changeActive(3); return false">第四页</a>

       <br><br>

       <a href="#" onmouseover="scroll(5)" onmouseout="noScroll()" onclick="return false">向上</a>

       <a href="#" onmouseover="scroll(-5)" onmouseout="noScroll()" onclick="return false">向下</a>

</div>

<div id="divCont">

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

              <br>    在主场击败灰熊之前,快船已经在他们之前9场的比赛当中输掉了8场,即便是大话连篇的主教练金特里也不得不承认这是他在教练生涯里所经历的最为黯淡的时刻。但是即便是这样严重的危机也没有触动金特里固执的神经,在主场击败灰熊之后,金特里又感觉良好地走在了老路上。金特里必须知道:“一场胜利并不意味着情况得到了扭转,不断下沉的快船有太多的窟窿要紧急修补。”

 

<br>    即使只从数据上来看,快船的退步也是十分明显的,他们的平均得分已经从每场95.7分下降到92.5分,命中率从43.8%下降到43.3%,篮板数从每场43.5个下降到41.7个,快船队的技术统计在全面下降,当然也有一些数据在升高,比如失误数,他们现在平均每场比赛失误16.5次。

 

<br>    金特里直到现在还在坚持,一旦快船队的主力球员能够从伤病中康复,一旦他能够重新拥有全部的队员,一切都会重归平静,快船队又会成为一支实力不俗的强队。他的全部论断都是建立在快船队这个赛季仅有的几场拿的出手的胜利。比如他们战胜活塞,击败马刺,以及两胜火箭。

 

<br>    我必须说我同意金特里的部分观点,那就是这支球队的确充满了潜力,而且的确有很多货真价实的天才。但是要知道,在这个联盟之中,同样充满潜力的球队并不在少数,偶尔的一场漂亮胜利,任何一支球队都能够取得,问题的关键是能否持续稳定地表现出较高地竞技水准。快船有足够的条件让自己成为一支强队,前提是他们必须找到正确的方法。

 

<br>    米勒是一个关键性的球员,因为伤病而只在本赛季出场六次的小前锋奥多姆也同样是一个不可多得的天才。奥洛沃坎迪也是一个处在上升期的优秀球员,但是球队糟糕的战绩能否留住他可是一个大大的问号。理查德森、马格特、皮亚考斯基、贾里奇都是能够用的上的球员,还有投手的问题,快船糟糕的命中率不是他们缺乏投手造成的,可以信赖的中国球员王治郅在大部分时间里,都被金特里放在了板凳上。他有足够优秀的才能来为快船队出力,但是前提是金特里必须意识到这一点。

 

<br>    如果让我坦率地讲出我对这支球队目前的印象的话,可能会让金特里有些难受。快船队在进攻的时候热衷于单打独斗,在防守的时候又站位稀松,他们没有一丝一毫地成为金特里所说的“强大球队”的迹象。明白地说如果他们不立刻修补他们自己的窟窿的话,船会沉的。

 

<br>    如果金特里仍然梦想带领快船跻身季后赛的话,他就必须在剩下的比赛中取得28场以上的胜利。这个目标显然让更多的人相信,他们已经和季后赛说再见了,但是即使如此,对于这支年轻的球队来说,在未来的比赛当中表现出一支季后赛球队应该具备的水准仍然是十分必要的。因为这样他们至少还能拥有尊严。

 

<br>    在受伤的球员逐渐回归主力阵容之后,快船队在实力上显然已经具备了取得佳绩的条件,在这种情况下,主教练金特里能否正确地运用他的球队就成为了快船队能否前进的关键。

 

<br>    金特里首先要做的就是改进球队的防守,如果不能够限制住对手的得分,尤其遏制住对手的快攻,快船队要想取得理想的战绩就会变得十分的艰难。此外还有投手的问题,金特里必须解决,那些认为有一两个主力队员回归之后,得分就会大幅度增加的想法过于天真。金特里必须明白有太多的事情需要他去改变,如果他还有欲望去取得胜利。(飞鹰编译)

       </div>

      

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

              <br>新浪体育讯 卡塔尔多哈当地时间113下午4点,备战十国赛的中国国奥队进行了第二次训练。在这次训练中,主教练沈祥福进行了分组对抗的小场地比赛,主力阵容浮出水面。图为周麟再做准备活动。(何其/)

 

  

 <br>

       </div>

 

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

              科比-布莱恩特

 

  17,湖人VS超音速,个人独得45分,其中包括创纪录的12个三分球,湖人119-98战胜超音速;

 

  110,湖人VS骑士,得到个人职业生涯第八次三双,21分、10个篮板、11次助攻、4次抢断、3次高帽,湖人115-99战胜骑士;

 

  112,湖人VS热队,得到36分、4次助攻、4次抢断以及3个篮板,湖人106-81战胜热队。

 

  

 

              <br>

       </div>

 

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

              小奥尼尔

 

  16,步行者VS76人,得到17(包括最后1.7秒钟投中决定胜负的一球)13个篮板以及3次盖帽,步行者105-104加时赛战胜76人队;

 

  18,步行者VS尼克斯,得到16分、8个篮板、2次助攻、2次抢断,步行者主场取胜;

 

  110,步行者VS魔术队,得到21分,4个篮板、4次助攻、3次抢断,步行者101-97加时赛战胜魔术;

 

  111,步行者VS勇士,得到23分、12个篮板、5次盖帽、3次助攻,步行者战胜勇士,这是小奥尼尔上周发挥最好的一场比赛。

 

  

 

       </div>

</div>

 

 

 

 

 

</body>

</html>

 

 

 

0 Comments

Tue

24

Feb

2009

64、不同内容的文字链接

64、不同内容的文字链接

脚本说明:

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

<script language="JavaScript1.2">

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;

var ns6=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1;

var ns4=document.layers;

 

function showContent(content)

{

 if(ie4)

 {

  showContentObj=document.all.qiksearch_div;

 }

 if(ns6)

 {

  showContentObj=document.getElementById("qiksearch_div");

 }

 if(ie4||ns6)

 {

  if(showContentObj.innerHTML!=content)

  {

   showContentObj.innerHTML=content;

  }

  else

  {

   showContentObj.innerHTML="";

  }

 }

 if(ns4)

 {

  document.nsdiv.document.write(content);

  document.nsdiv.document.close();

 }

}

 

</script>

<center>

<a href="javascript:void(0);" onClick="javascript:showContent('<font face=verdana,arial,helvetica>This is Content 1</font>');"><font face="verdana,arial,helvetica" color="#CC0000" size="-1"><b>内容一</b></font></a> | <a href="javascript:void(0);" onClick="javascript:showContent('<font face=verdana,arial,helvetica>This is Content 2</font>');"><font face="verdana,arial,helvetica" color="#CC0000" size="-1"><b>内容二</b></font></a> | <a href="javascript:void(0);" onClick="javascript:showContent('<font face=verdana,arial,helvetica>This is Content 3</font>');"><font face="verdana,arial,helvetica" color="#CC0000" size="-1"><b>内容三</b></font></a>

<br><br><layer id="nsdiv" left="310"></layer>

<div id="qiksearch_div"></div></center>

 

 

0 Comments

Tue

24

Feb

2009

63、广告文字的显示

63、广告文字的显示

脚本说明:

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

<SCRIPT language=JavaScript1.2>

var message="欢迎你的光临"

var neonbasecolor="#FFFFFF"

var neontextcolor="red"

var flashspeed=200  //in milliseconds

 

var n=0

if (document.all){

document.write('<a href=http://7stk.com target=_blank><font color="'+neonbasecolor+'">')

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

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

document.write('</font></a>')

 

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

Tue

24

Feb

2009

62、文字链接说明展开

62、文字链接说明展开

脚本说明:

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

<style>

<!--

 

#tickerarea{

border:1px solid black;

}

 

#expandbutton{

background-color:white;

width:100px;

}

 

.expandmenu{

position:absolute;

width:250px;

border:1px solid black;

background-color:white;

visibility:hidden;

z-index:50;

}

 

.expandmenu a{

text-decoration:none;

font: normal 14px default;

}

 

.expandmenu_highlight{

background-color:lightyellow;

}

 

-->

</style>

<script language="JavaScript1.2">

 

//configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)

var tickercontents=new Array()

tickercontents[0]='欢迎你光临网页制作的优秀网站 <a href="http://www.7stk.com">网页特效代码</a> 希望你能有更多的收获!'

tickercontents[1]='欢迎你光临国内最大的娱乐类网站 <a href="http://www.163.com">网易</a> 希望你能有更多的收获!'

tickercontents[2]='欢迎你光临国内最大的搜索类网站 <a href="http://www.7syg.com">搜狐</a> 希望你能有更多的快乐!'

 

//specify how many characters of a message (for each msg) to show in expanded menu:

var charslimit=30

 

//Below specifies the "expand text". Do not remove onClick=".." portion.

var expandtext='<a href="#" onClick="dropdownit(event);return false">展开</a> <img src="tridown.gif" border=0>'

 

//configure below variables to set dimensions and main color of the ticker

var tickerwidth='275px'

var tickerheight='75px' //not including "Expand" text

var tickerbgcolor='#DDDDFF'

 

//configure the below variable to determine the delay between ticking of messages (in miliseconds)

var tickdelay=2500

 

////Do not edit pass this line////////////////

 

var ie4=document.all || navigator.userAgent.search(/opera.7/i)!=-1 //lump Opera 7 with IE

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

var ns4=document.layers

 

if (ns4){

expandtext=expandtext.replace(/dropdownit\(event\); *return false/gi, "return dropdownitNS4(event,this)")

tickerheightNS4=parseInt(tickerheight)+19

tickerlistheightNS4=tickerheight

}

 

var currentmessage=0

var tickercontentstotal=''

 

if (ie4||ns6) //OUTPUT DROP DOWN MENU

document.write('<div id="tickerexpand" class="expandmenu" style="visibility:hidden"></div>')

 

function rotatecontent(){

if (ns4){ //OUTPUT HTML for ticker area for NS4

tickerobj.document.tickernssub.document.write(tickercontents[currentmessage]+'')

tickerobj.document.tickernssub.document.close()

}

else if (ie4||ns6){

tickerobj.innerHTML=tickercontents[currentmessage]

previousmessage=(currentmessage==0)? tickercontents.length-1 : currentmessage-1

tickerexpand_item=ns6? document.getElementById("expand"+currentmessage) : eval("expand"+currentmessage)

tickerexpand_previousitem=ns6? document.getElementById("expand"+previousmessage) : eval("expand"+previousmessage)

tickerexpand_previousitem.className=""

tickerexpand_item.className="expandmenu_highlight"

}

currentmessage=(currentmessage==tickercontents.length-1)? 0 : currentmessage+1

rotatemsgtimer=setTimeout("rotatecontent()",tickdelay)

}

 

function dropdownit(e){

if (ns6) e.stopPropagation()

else e.cancelBubble=true

tickerexpandobj.style.visibility=tickerexpandobj.style.visibility=="hidden"? "visible" : "hidden"

expandbuttonLeft=ns6? e.pageX-e.layerX : document.body.scrollLeft+event.clientX-event.offsetX

expandbuttonTop=ns6? e.pageY-e.layerY : document.body.scrollTop+event.clientY-event.offsetY

tickerexpandobj.style.left=expandbuttonLeft+"px"

tickerexpandobj.style.top=expandbuttonTop+expandbuttonobj.offsetHeight-3+"px"

}

 

function dropdownitNS4(e, currentobj){

tickerexpandobj.left=tickerobj.pageX

tickerexpandobj.top=tickerobj.pageY+parseInt(tickerlistheightNS4)+tickerobj.document.expandbuttonNS4.document.height

tickerexpandobj.visibility=(tickerexpandobj.visibility=="hide")? "show" : "hide"

return false

}

 

function jumptomsg(whichmsg){

clearTimeout(rotatemsgtimer)

if (ie4||ns6)

tickerexpand_item.className=""

currentmessage=whichmsg

rotatecontent()

}

 

function initialize_ticker(){

if (ns4) document.tickernsmain.visibility="show"

tickerobj=ie4? tickerlist : ns6? document.getElementById("tickerlist") : ns4? document.tickernsmain : ""

tickerexpandobj=ie4? tickerexpand : ns6? document.getElementById("tickerexpand") : ns4? document.expandlayer : ""

expandbuttonobj=ie4? expandbutton : ns6? document.getElementById("expandbutton") : ""

for (i=0;i<tickercontents.length;i++){ //get total scroller contents

tempstringcontainer=tickercontents[i].replace(/\<[^\>]+\>/g, ''); //remove HTML tags

tickercontentstotal+='<div id="expand'+i+'">- <a href="javascript:jumptomsg('+i+')">'+tempstringcontainer.substring(0, charslimit)+'...</a></div>'

}

if (ie4||ns6){

tickerexpandobj.innerHTML=tickercontentstotal

expandbuttonobj.innerHTML=expandtext

document.onclick=function(){

tickerexpandobj.style.visibility="hidden"

}

}

else if (ns4){

tickerexpandobj.document.write(tickercontentstotal)

tickerexpandobj.document.close()

tickerexpandobj.clip.width=parseInt(tickerwidth)*0.9

tickerobj.document.expandbuttonNS4.document.write(expandtext)

tickerobj.document.expandbuttonNS4.document.close()

tickerexpandobj.captureEvents(Event.CLICK)

tickerexpandobj.onclick=function(){

tickerexpandobj.visibility="hide"

}

}

rotatecontent()

}

 

if (ie4||ns6) //OUT HTML FOR TICKER AREA for IE/NS6

document.write('<table id="tickerarea" border="0" style="width:'+tickerwidth+';" bgcolor="'+tickerbgcolor+'" cellspacing="0" cellpadding="0"><tr><td id="tickerlist" width="100%" height="'+tickerheight+'" style="padding-left:3px" valign="top"></td></tr><tr><td width="90%"><div id="expandbutton" style="position:relative"></div></td></tr></table>')

 

window.onload=initialize_ticker

</script>

 

<ilayer id="tickernsmain" width=&{tickerwidth}; height=&{tickerheightNS4}; bgColor=&{tickerbgcolor}; visibility=hide><layer id="tickernssub" width=&{tickerwidth}; left=0 top=0></layer><layer id="expandbuttonNS4" left=0 top=&{tickerlistheightNS4};></layer></ilayer>

<layer id="expandlayer" bgColor=&{tickerbgcolor}; visibility=hide></layer>

 

0 Comments

Tue

24

Feb

2009

61、滚动新闻的处理

61、滚动新闻的处理

脚本说明:

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

<script type="text/javascript">

 

    //<![CDATA[

 

    <!--

 

    function scrollerObj(name,initH,initW,heightB,widthB,content,initBg,Bg,speed,initFl){

 

    //**data**//

 

    this.name=name;

 

    this.initH=initH;

 

    this.initW=initW;

 

    this.heightB=heightB;

 

    this.widthB=widthB;

 

    this.content=content;

 

    this.initBg=initBg;

 

    this.Bg=Bg;

 

    this.iniFl=initFl;

 

    this.speed=parseInt(speed);

 

    this.timer = name + "Timer";

 

    this.elem;

 

 

 

 

 

    //**methods**//

 

    this.getElement = getElement;

 

    this.createLayer=createLayer;

 

    this.scrollLayer = scrollLayer;

 

    this.scrollLoop=scrollLoop;

 

 

 

    //**initiate methods**//

 

    this.createLayer();

 

    this.getElement();

 

    this.scrollLayer();

 

    }

 

 

 

    //**call this method to stop scrolling**//

 

    function scrollLoop(s){

 

    this.speed = s;

 

    }

 

 

 

    //**pretty obvious**//

 

    function scrollLayer(){

 

    if(parseInt(this.elem.style.top)>(this.elem.offsetHeight*(-1))){

 

        this.elem.style.top = parseInt(this.elem.style.top)-this.speed;

 

        //alert(parseInt(this.elem.style.top)+"\n"+this.elem.id);

 

    }

 

    else {this.elem.style.top = this.initH;}

 

    }

 

 

 

    //**get the specific dom-expression**//

 

    function getElement(){

 

    if(document.getElementById){

 

        this.elem = document.getElementById(this.name);

 

        }

 

    else if (document.all){

 

    this.elem = document.all[name];

 

        }

 

    else if (document.layers){

 

    this.elem = document.layers[name];

 

        }

 

    }

 

 

 

    //**pretty obvious - if NS4 - please upgrade to a standard compliant browser**//

 

    function createLayer(){

 

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

 

    document.write('<div id="layer'+this.name+'" style="position:relative;overflow:hidden;float:'+this.initFl+';background-color:#'+this.initBg+';border:1px solid black;width:'+this.initW+'px;height:'+this.initH+'px;" onMouseover="'+this.name+'.scrollLoop(0)" onMouseout="'+this.name+'.scrollLoop('+this.speed+')">');

 

    document.write('<div id="'+this.name+'" style="position:absolute;top:'+this.initH+'px;left:0px;border:0px solid black;width:'+this.widthB+'px;height:'+this.heightB+'px;background-color:#'+this.Bg+'">');

 

    document.write(this.content);

 

    document.write('<\/div><\/div>');}

 

    else if(document.layers){

 

        document.write('<ilayer name="'+this.name+'" bgcolor="#'+this.Bg+'" width="'+this.widthB+'" height="'+this.heightB+'">'+this.content+'<\/ilayer>');

 

        return;

 

    }

 

    if(this.scrollLayer){

 

      this.timer = setInterval(this.name+'.scrollLayer()','30');

 

    }

 

    }

 

 

 

    //-->

 

 

 

 

 

    //]]>

 

    </script>

 

    <style media="screen" type="text/css">

 

    /*<![CDATA[*/

 

    <!--

 

    P{color:#465d5c;margin:3px;}

 

    A{color:#e86500}

 

    H1{color:#465d5c;font-size:11px;font-weight:normal;font-weight:bold;font-size:11px;font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular;margin:3px; padding:0px}

 

    H2{color:#465d5c;font-size:11px;font-weight:bold;font-size:11px;font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular;margin:3px; padding:0px}

 

    .art{font-weight:normal;font-size:11px;font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular;width:100%;border-top:1px solid #FFFFFF;border-bottom:1px solid #FF7F00; padding:3px;margin-bottom:10px;text-align: justify;}

 

    .state{color:#e86500;margin-left:5px;margin-right:5px;}

 

    #art1{background-color:#FFBB00;}

 

    #art2{background-color:#FFCC00;}

 

    #art3{background-color:#FFDD00;}

 

    #art4{background-color:#FFEE00;}

 

    #main{background-image: url(img/bg_px_3.gif);background-color: #cc6600;width:600px;padding-bottom:75px;border:1px solid white}

 

    #logo{margin-left:10px; margin-top:3px; margin-bottom:10px; font-weight:bold;font-size:11px;font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular;width:100%;}

 

    #date{font-size:9px; font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular;color:#545454}

 

 

 

    -->

 

    /*]]>*/

 

    </style>

 

<div align="center">

 

        <script type="text/javascript">

 

        //<![CDATA[

 

        <!--

 

        var c = new scrollerObj('c','300','100','50','100','<h1>滚动新闻<\/h1><p>This scroller code will allow you to put several newsboxes on your site. You can put any valid html in the box, including images.<\/p><p>Please note that when you put the ooscroller in a table, this will not work in Mozilla. When you hover your mouse over the box when running Mozilla: not working either. If anybody knows whats going on please <a href="mailto:webmaster@n.one.port5.com">mail me<\/a><\/p>','FFDD00','cccccc','2','center');

 

        //-->

 

        //]]>

 

        </script>

 

</div>

 

0 Comments