上一页       3     4     5     6            下一页

 

文字特效代码4

 

Thu

26

Feb

2009

120、大段文字的翻滚处理

120、大段文字的翻滚处理

脚本说明:

<div style="background-color:#FFFFDD;width:155"><center><a href="javascript:movedown()">向下</a>  <a href="javascript:moveup()">向上</a>

<a href="javascript:stopscroll()">停止</a>  <a href="javascript:movetop()">到顶</a></center>

</div>

 

<SCRIPT language="JavaScript1.2">

var speed=4

 

iens6=document.all||document.getElementById

ns4=document.layers

 

if (iens6){

document.write('<div id="container" style="position:relative;width:155;height:160px;overflow:hidden;border:2px ridge white">')

document.write('<div id="content" style="position:absolute;width:155;left:0;top:0">')

}

</script>

<ilayer name="nscontainer" width=155 height=160 clip="0,0,155,160">

<layer name="nscontent" width=155 height=160 visibility=hidden>

 

<!--INSERT CONTENT HERE-->

<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> 欢迎光临本站,在这里,你一定会有更多的发现</font></p>

<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> 欢迎光临本站,在这里,你一定会有更多的发现</font></p><p><font size="2" face="Arial">-</font><font size="2" face="Arial"> 欢迎光临本站,在这里,你一定会有更多的发现</font></p><p><font size="2" face="Arial">-</font><font size="2" face="Arial"> 欢迎光临本站,在这里,你一定会有更多的发现</font></p><p><font size="2" face="Arial">-</font><font size="2" face="Arial"> 欢迎光临本站,在这里,你一定会有更多的发现</font></p><p><font size="2" face="Arial">-</font><font size="2" face="Arial"> 欢迎光临本站,在这里,你一定会有更多的发现</font></p><p><font size="2" face="Arial">-</font><font size="2" face="Arial"> 欢迎光临本站,在这里,你一定会有更多的发现</font></p><p><font size="2" face="Arial">-</font><font size="2" face="Arial"> 欢迎光临本站,在这里,你一定会有更多的发现</font></p>

</layer>

</ilayer>

 

<script language="JavaScript1.2">

if (iens6){

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

var crossobj=document.getElementById? document.getElementById("content") : document.all.content

var contentheight=crossobj.offsetHeight

}

else if (ns4){

var crossobj=document.nscontainer.document.nscontent

var contentheight=crossobj.clip.height

}

 

function movedown(){

if (window.moveupvar) clearTimeout(moveupvar)

if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))

crossobj.style.top=parseInt(crossobj.style.top)-speed

else if (ns4&&crossobj.top>=(contentheight*(-1)+100))

crossobj.top-=speed

movedownvar=setTimeout("movedown()",100)

}

 

function moveup(){

if (window.movedownvar) clearTimeout(movedownvar)

if (iens6&&parseInt(crossobj.style.top)<=0)

crossobj.style.top=parseInt(crossobj.style.top)+speed

else if (ns4&&crossobj.top<=0)

crossobj.top+=speed

moveupvar=setTimeout("moveup()",100)

}

 

function stopscroll(){

if (window.moveupvar) clearTimeout(moveupvar)

if (window.movedownvar) clearTimeout(movedownvar)

}

 

function movetop(){

stopscroll()

if (iens6)

crossobj.style.top=0

else if (ns4)

crossobj.top=0

}

 

function getcontent_height(){

if (iens6)

contentheight=crossobj.offsetHeight

else if (ns4)

document.nscontainer.document.nscontent.visibility="show"

}

window.onload=getcontent_height

</script>

 

0 Comments

Tue

24

Feb

2009

119、向上滚动的文字显示

119、向上滚动的文字显示

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

//slider's width

var swidth=350

 

//slider's height

var sheight=72

 

//slider's speed

var sspeed=2

 

//messages: change to your own; use as many as you'd like; set up Hyperlinks to URLs as you normally do: <a target=... href="... URL ...">..message..</a>

var singletext=new Array()

singletext[0]='<div align="center"><font face=Arial size=3 color="white"><b>网页特效代码</b><br>Size, Speed, Style <b>adjustable.</b><br>This message may use <b><u>Hyperlinks</u></b></div></FONT>'

singletext[1]='<div align="center"><font face=Arial size=3 color="white">Use this for announcements<br>or even <font color="#FFFF00"><b><i>images</i></b><p><img src="jzzy.gif" border="0"></font></div>'

singletext[2]='<div align="center"><font face=Arial size=3 color="white">This is great!<br>You can use <i>all</i> the <b>basic</b><br><b>HTML codes</b></font></div>'

singletext[3]='<div align="center"><font face=Arial size=3 color="white"><b>网页特效代码</b><br>A "cut & paste" JavaScript library<br>with <font color="red"><b>tons</b></font> of free JavaScripts!<p><img src="jzzy.gif"  border="0"></font></div>'

if (singletext.length>1)

i=1

else

i=0

function start(){

if (document.all){

ieslider1.style.top=sheight

iemarquee(ieslider1)

}

else if (document.layers){

document.ns4slider.document.ns4slider1.top=sheight

document.ns4slider.document.ns4slider1.visibility='show'

ns4marquee(document.ns4slider.document.ns4slider1)

}

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

document.getElementById('ns6slider1').style.top=sheight

ns6marquee(document.getElementById('ns6slider1'))

}

}

function iemarquee(whichdiv){

iediv=eval(whichdiv)

if (iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){

iediv.style.pixelTop=0

setTimeout("iemarquee(iediv)",100)

}

if (iediv.style.pixelTop>=sheight*-1){

iediv.style.pixelTop-=sspeed

setTimeout("iemarquee(iediv)",100)

}

else{

iediv.style.pixelTop=sheight

iediv.innerHTML=singletext[i]

if (i==singletext.length-1)

i=0

else

i++

}

}

function ns4marquee(whichlayer){

ns4layer=eval(whichlayer)

if (ns4layer.top>0&&ns4layer.top<=sspeed){

ns4layer.top=0

setTimeout("ns4marquee(ns4layer)",100)

}

if (ns4layer.top>=sheight*-1){

ns4layer.top-=sspeed

setTimeout("ns4marquee(ns4layer)",100)

}

else{

ns4layer.top=sheight

ns4layer.document.write(singletext[i])

ns4layer.document.close()

if (i==singletext.length-1)

i=0

else

i++

}

}

function ns6marquee(whichdiv){

ns6div=eval(whichdiv)

if (parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){

ns6div.style.top=0

setTimeout("ns6marquee(ns6div)",100)

}

if (parseInt(ns6div.style.top)>=sheight*-1){

ns6div.style.top=parseInt(ns6div.style.top)-sspeed

setTimeout("ns6marquee(ns6div)",100)

}

else{

ns6div.style.top=sheight

ns6div.innerHTML=singletext[i]

if (i==singletext.length-1)

i=0

else

i++

}

}

//  End -->

</script>

<BODY onLoad="start()">

<div align="center">

<span style="borderWidth:1; borderColor:red; width:350; height:72; background:navy">

<ilayer id="ns4slider" width="&{swidth};" height="&{sheight};">

<layer id="ns4slider1" height="&{sheight};" onmouseover="sspeed=0;" onmouseout="sspeed=2">

<script language="JavaScript">

if (document.layers)

document.write(singletext[0])

</script>

</layer></ilayer>

<script language="JavaScript">

if (document.all){

document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1 solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=2">')

document.writeln('<div id="ieslider1" style="position:relative;width:'+swidth+';">')

document.write(singletext[0])

document.writeln('</div></div>')

}

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

document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1px solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=2">')

document.writeln('<div id="ns6slider1" style="position:relative;width:'+swidth+';">')

document.write(singletext[0])

document.writeln('</div></div>')

}

</script></span>

</div>

 

0 Comments

Tue

24

Feb

2009

118、闪烁的文字链接

118、闪烁的文字链接

脚本说明:

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

<font color="#000000"><a href="http://www.7stk.com" target="_blank" id=flashit>欢迎光临网页特效代码</a>

<script language=JavaScript1.2>

<!--

if (document.all&&document.all.flashit){

 

var flashelement=document.all.flashit

if (flashelement.length==null)

flashelement[0]=document.all.flashit

 

function changecolor(which){

if (flashelement[which].style.color=='')

flashelement[which].style.color="red"

else

flashelement[which].style.color=""

}

if (flashelement.length==null)

setInterval("changecolor(0)",1000)

else

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

var tempvariable='setInterval("changecolor('+i+')",'+'1000)'

eval(tempvariable)

}

 

}

-->

</script>

 

 

0 Comments

Tue

24

Feb

2009

117、表格中颜色的渐变

117、表格中颜色的渐变

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

 

<!-- Begin

IE = (document.all);

if (IE) {

  var chidc = new Array();

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

  var chidn = new Array(100,70,40);

  var step = new Array(10,10,10);

  var chway = new Array(step[0],step[1],step[2]);

  var tone = new Array(1,1,1);

  function chcol() {

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

      chidn[i]+=chway[i];

      if (chidn[i]>=255) {

        chidn[i] = 255;

        chway[i] = -step[i];

      }

    else if (chidn[i]<=40) {

        chidn[i] = 40;

        chway[i] = step[i];

        tone[i]>=3? tone[i] = 1:tone[i]++;

      }

      col1 = hexc[Math.floor(chidn[i]/16)];

      col2 = hexc[chidn[i]%16];

      tored = '';

      toblue = '';

      for (j=1; j<tone[i]; j++) tored+='00';

      for (j=3; j>tone[i]; j--) toblue+='00';

      chidc[i] = '#'+tored+col1+col2+toblue;

      td = eval('document.all.chcol'+i);

      td.style.backgroundColor = chidc[i];

    }

    setTimeout('chcol()',100);

  }

}

//  End -->

</script>

 

<center>

<table cellspacing=2 cellpadding=0 bgcolor=#999999 width=300>

<tr>

<td width=33% align=center id=chcol0 name=id=chcol0>

<font color=white>Left</td>

<td width=33% align=center id=chcol1 name=id=chcol0>

<font color=white>To</td>

<td width=33% align=center id=chcol2 name=id=chcol0>

<font color=white>Right</td>

</tr>

</table>

</center>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

chcol();

//  End -->

</script>

 

0 Comments

Tue

24

Feb

2009

116、变换的信息提示条

116、变换的信息提示条

脚本说明:

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

<script language="JavaScript1.2">

var delay=2000

//Configure scroller width

var scrollwidth=210

//Configure scroller height

var scrollheight=75

var message=new Array()

//Configure messages. Extend array as needed:

var openingtag='<font face="Arial" size=3>'

message[0]='<b>网页特效代码7stk.com欢迎你的光临!</b>'

message[1]='<b>请多提意见,谢谢!</b>'

message[2]='<b>在这里有你需要的一切!</b>'

var closingtag='</font>'

 

//This variable specifies the initial negative offset of each msg

//You may wish to increase it if your scroller is to the right of page horizontally

var hoffset=-10

 

</script>

<ilayer width=&{scrollwidth}; height=&{scrollheight}; name="sslide">

<layer name="sslide2" width=&{scrollwidth}; height=&{scrollheight};></layer>

</ilayer>

 

<script language="JavaScript1.2">

 

var inc=1

var ns4=document.layers

var ie5ns6=document.getElementById||document.all

 

if (ie5ns6)

document.write(openingtag+'<div id="flyin" style="position:relative;width:'+scrollwidth+';height:'+scrollheight+';">'+message[0]+'</div>'+closingtag)

 

 

function updatemsg(){

crossobj.style.left=-2000

crossobj.style.fontStyle="italic"

crossobj.innerHTML=message[inc]

crossobj.style.left=crossobj.offsetWidth*(-1)+hoffset

start=setInterval("animatein()",50)

inc=(inc<message.length-1)? inc+1 : 0

}

 

function animatein(){

if (parseInt(crossobj.style.left)<0)

crossobj.style.left=parseInt(crossobj.style.left)+20

else{

crossobj.style.left=0

crossobj.style.fontStyle="normal"

clearInterval(start)

}

}

 

function updatemsgns4(){

document.sslide.document.sslide2.document.write(openingtag+message[inc]+closingtag)

document.sslide.document.sslide2.document.close()

inc=(inc<message.length-1)? inc+1 : 0

}

 

function initialize(){

if (ie5ns6){

crossobj=document.getElementById? document.getElementById("flyin") : document.all.flyin

setInterval("updatemsg()",delay+1000)

}

else if (ns4){

document.sslide.document.sslide2.document.write(openingtag+message[0]+closingtag)

document.sslide.document.sslide2.document.close()

setInterval("updatemsgns4()",delay)

}

}

 

window.onload=initialize

 

</script>

 

0 Comments

Tue

24

Feb

2009

114、重要的提醒文字

114、重要的提醒文字

脚本说明:

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

<h2><span id="fly"></span></h2>

<script>

window.onerror=new Function("return true")

 

//Configure message to display. Use "$" for linebreak

message = "Thanks for visiting 7stk.com!" // $ = taking a new line

distance = 50 // pixel(s)

speed = 100 // milliseconds

 

if (!document.all)

document.write('<h2>'+message+'</h2>')

 

</script>

 

<script language="JavaScript1.2">

 

txt="";num=0;num4=0;flyofle="";flyofwi="";flyofto=""

function stfly(){for(i=0;i != message.length;i++){if(message.charAt(i) != "$"){txt=txt+"<span style='position:relative;visibility:hidden;' id='n"+i+"'>"+message.charAt(i)+"<\/span>"};else{txt=txt+"<br>"}};fly.innerHTML=txt;txt="";flyofle=fly.offsetLeft;flyofwi=fly.offsetWidth;flyofto=fly.offsetTop;fly2b()}

function fly2b(){if(num4 != message.length){if(message.charAt(num4) != "$"){eval("n"+num4+".style.left=flyofle-n"+num4+".offsetLeft+flyofwi/2");eval("n"+num4+".style.top=flyofto-n"+num4+".offsetTop+distance");eval("fly3('n"+num4+"',eval(n"+num4+".style.left.substring(0,n"+num4+".style.left.length-2)),(eval(n"+num4+".style.left.substring(0,n"+num4+".style.left.length-2))/5),eval(n"+num4+".style.top.substring(0,n"+num4+".style.top.length-2)),(eval(n"+num4+".style.top.substring(0,n"+num4+".style.top.length-2))/5))")};num4++;setTimeout("fly2b()",speed)}}

function fly3(target,lef2,num2,top2,num3){if((Math.floor(top2) != 0 && Math.floor(top2) != -1) || (Math.floor(lef2) != 0 && Math.floor(lef2) != -1)){if(eval("'"+lef2+"'").charAt(0) != '-'){lef2=lef2-num2};else{lef2=lef2+(-num2)};if(Math.floor(lef2) != -1){eval(target+".style.visibility='visible';"+target+".style.left=Math.floor(lef2)")};else{eval(target+".style.visibility='visible';"+target+".style.left=Math.floor(lef2+1)")};if(eval("'"+lef2+"'").charAt(0) != '-'){top2=top2-num3};else{top2=top2+(-num3)};if(Math.floor(top2) != -1){eval(target+".style.top=Math.floor(top2)")};else{eval(target+".style.top=Math.floor(top2+1)")};setTimeout("fly3('"+target+"',"+lef2+","+num2+","+top2+","+num3+")",50)}};

 

stfly()

 

</script>

 

0 Comments

Tue

24

Feb

2009

113、很酷的文字滚动显示

113、很酷的文字滚动显示

脚本说明:

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

<STYLE type=text/css>

#scrollerContent {POSITION: absolute}

body {font-size:9pt;color:#660000;text-decoration: none}

</STYLE>

<script>

var upH = 13;//向上的箭头的高度

var upW = 9; //向上的箭头的宽度

var downH = 13;//向下的箭头的高度

var downW = 9;//向下的箭头的宽度

var dragH = 26; //滚动条的高度

var dragW = 9; //滚动条的宽度

var scrollH =68; //滚动体的高度

var speed =9; //滚动的速度

var dom = document.getElementById ? true:false;

var nn4 = document.layers ? true:false;

var ie4 = document.all ? true:false;

var mouseY;

var mouseX;

var clickUp = false;

var clickDown = false;

var clickDrag = false;

var clickAbove = false;

var clickBelow = false;

var timer = setTimeout("",500);

var upL;

var upT;

var downL;

var downT;

var dragL;

var dragT;

var rulerL;

var rulerT;

var contentT;

var contentH;

var contentClipH;

var scrollLength;

var startY;

function down(e){

if((document.layers && e.which!=1) || (document.all && event.button!=1)) return true;

getMouse(e);

startY = (mouseY - dragT);

if(mouseX >= upL && (mouseX <= (upL + upW)) && mouseY >= upT && (mouseY <= (upT + upH))){

clickUp = true;

return scrollUp();

}

else if(mouseX >= downL && (mouseX <= (downL + downW)) && mouseY >= downT && (mouseY <= (downT + downH))){

clickDown = true;

return scrollDown();

}

else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= dragT && (mouseY <= (dragT + dragH))){

clickDrag = true;

return false;

}

else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= rulerT && (mouseY <= (rulerT + scrollH))){

if(mouseY < dragT){

clickAbove = true;

clickUp = true;

return scrollUp();

}

else{

clickBelow = true;

clickDown = true;

return scrollDown();

}

}

else{

return true;

}

}

function move(e){

if(clickDrag && contentH > contentClipH){

getMouse(e);

dragT = (mouseY - startY);

if(dragT < (rulerT))

dragT = rulerT;

if(dragT > (rulerT + scrollH - dragH))

dragT = (rulerT + scrollH - dragH);

contentT = ((dragT - rulerT)*(1/scrollLength));

contentT = eval('-' + contentT);

moveTo();

if(ie4)

return false;

}

}

function up(){

clearTimeout(timer);

clickUp = false;

clickDown = false;

clickDrag = false;

clickAbove = false;

clickBelow = false;

return true;

}

function getT(){

if(ie4)

contentT = document.all.scrollerContent.style.pixelTop;

else if(nn4)

contentT = document.scrollerContentClip.document.scrollerContent.top;

else if(dom)

contentT = parseInt(document.getElementById("scrollerContent").style.top);

}

function getMouse(e){

if(ie4){

mouseY = event.clientY + document.body.scrollTop;

mouseX = event.clientX + document.body.scrollLeft;

}

else if(nn4 || dom){

mouseY = e.pageY;

mouseX = e.pageX;

}

}

function moveTo(){

if(ie4){

document.all.scrollerContent.style.top = contentT;

document.all.ruler.style.top = dragT;

document.all.drag.style.top = dragT;

}

else if(nn4){

document.scrollerContentClip.document.scrollerContent.top = contentT;

document.ruler.top = dragT;

document.drag.top = dragT;

}

else if(dom){

document.getElementById("scrollerContent").style.top = contentT + "px";

document.getElementById("drag").style.top = dragT + "px";

document.getElementById("ruler").style.top = dragT + "px";

}

}

function scrollUp(){

getT();

if(clickAbove){

if(dragT <= (mouseY-(dragH/2)))

return up();

}

if(clickUp){

if(contentT < 0){

dragT = dragT - (speed*scrollLength);

if(dragT < (rulerT))

dragT = rulerT;

contentT = contentT + speed;

if(contentT > 0)

contentT = 0;

moveTo();

timer = setTimeout("scrollUp()",25);

}

}

return false;

}

function scrollDown(){

getT();

if(clickBelow){

if(dragT >= (mouseY-(dragH/2)))

return up();

}

if(clickDown){

if(contentT > -(contentH - contentClipH)){

dragT = dragT + (speed*scrollLength);

if(dragT > (rulerT + scrollH - dragH))

dragT = (rulerT + scrollH - dragH);

contentT = contentT - speed;

if(contentT < -(contentH - contentClipH))

contentT = -(contentH - contentClipH);

moveTo();

timer = setTimeout("scrollDown()",25);

}

}

return false;

}

function reloadPage(){

location.reload();

}

function eventLoader(){

if(ie4){

upL = document.all.up.style.pixelLeft;

upT = document.all.up.style.pixelTop;

downL = document.all.down.style.pixelLeft;

downT = document.all.down.style.pixelTop;

dragL = document.all.drag.style.pixelLeft;

dragT = document.all.drag.style.pixelTop;

rulerT = document.all.ruler.style.pixelTop;

contentH = parseInt(document.all.scrollerContent.scrollHeight);

contentClipH = parseInt(document.all.scrollerContentClip.style.height);

}

else if(nn4){

upL = document.up.left;

upT = document.up.top;

downL = document.down.left;

downT = document.down.top;

dragL = document.drag.left;

dragT = document.drag.top;

rulerT = document.ruler.top;

contentH = document.scrollerContentClip.document.scrollerContent.clip.bottom;

contentClipH = document.scrollerContentClip.clip.bottom;

}

else if(dom){

upL = parseInt(document.getElementById("up").style.left);

upT = parseInt(document.getElementById("up").style.top);

downL = parseInt(document.getElementById("down").style.left);

downT = parseInt(document.getElementById("down").style.top);

dragL = parseInt(document.getElementById("drag").style.left);

dragT = parseInt(document.getElementById("drag").style.top);

rulerT = parseInt(document.getElementById("ruler").style.top);

contentH = parseInt(document.getElementById("scrollerContent").offsetHeight);

contentClipH = parseInt(document.getElementById("scrollerContentClip").offsetHeight);

document.getElementById("scrollerContent").style.top = 0 + "px";

}

scrollLength = ((scrollH-dragH)/(contentH-contentClipH));

if(nn4){

document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);

window.onresize = reloadPage;

}

document.onmousedown = down;

document.onmousemove = move;

document.onmouseup = up;

}

</script>

<SPAN

id=drag

style="LEFT: 203px;POSITION: absolute; TOP: 116px"><IMG

height=26 src="slider.gif" width=9></SPAN> <SPAN

id=ruler

style="TOP: 116px"></SPAN> <SPAN

id=up

style="LEFT: 203px; POSITION: absolute; TOP: 100px"><IMG

height=13 alt="" src="scrollup.gif" width=9 border=0></SPAN> <SPAN id=down

style="LEFT: 203px; POSITION: absolute; TOP: 186px"><IMG

height=13 alt="" src="scrolldown.gif" width=9 border=0></SPAN> <SPAN

id=scrollerContentClip

style=" LEFT: 100; VISIBILITY: visible; OVERFLOW: hidden; WIDTH: 100; CLIP: rect(0px 140px 194px 0px); POSITION: absolute; TOP: 100; HEIGHT: 100;border:#CC6600 1px solid"><SPAN

id=scrollerContent style="width: 100; height: 100">

<p>asdfasdfasdfasdf<br>

 

                                                                                                  <font color="#008000"><SPAN

                  class=style24></SPAN></font><font color="#008000" face="宋体">

                                                                                                  </font>

                     <a href="http://www.7stk.com/tuxiang/tu48.htm">

                                                                                                  <font color="#008000">超酷FLASH图片特效代码-很经典的</font></a><p>

                     <font color="#008000"> <SPAN

                  class=style24></SPAN>

                     </font>

                     <a href="http://www.7stk.com/1/index08.htm"><font color="#008000">

                     在网页中实现QQ客服服务特效代码</font></a></p>

                     <p><font color="#008000"> <SPAN

                  class=style24> </SPAN>

                     </font>

                     <a href="http://www.7stk.com/radio/zonghe/r_08.htm">

                     <font color="#008000">

                     推荐一个网页音乐电台播放器代码</font></a></p>

                     <p><font color="#008000"> <SPAN

                  class=style24></SPAN> </font>

                     <a href="http://www.7stk.com/1/index06.htm"><font color="#008000">

                     免费天气预报代码,此代码很实用</font></a></p>

                     <p><font color="#008000"> <SPAN

                  class=style24></SPAN>

                     </font>

                     <a href="http://www.7stk.com/use/gongju/ip.htm">

                     <font color="#008000">显示网站来访者IP地址网页代码</font></a><p>

                     <font color="#008000"> <SPAN

                  class=style24></SPAN>

                     </font>

                                                                             <a href="../music/exobud/80/exobud.htm">

                                                                             <font color="#008000"></font></a><a target="_blank" href="../music/exobud/80/exobud.htm"><font color="#008000">自动更新的Flash播放器</font></a><font color="#008000">  

                     <a href="../music/exobud/80/daima.htm"><font color="#008000">代码</font></a></font><p>

                                                                                                  <font color="#008000"> <SPAN

                  class=style24></SPAN>

                     </font><a href="../flash/store/wenzi04.htm">

                                                                                                  <font color="#008000">超酷FLASH透明效果非常酷的代码</font></a><br>

                                                                                                  <font color="#008000">

                                                                                                  <SPAN

                  class=style24><br>

 </SPAN>

                     </font>

                                                                                                  <a href="http://www.7stk.com/shijian/t38.htm">

                                                                                                  <font color="#008000">

                                                                                                  一个不错的时间*效代码</font></a><p><br>

asdfasdf<br>

asdf<br>

asdf<br>

asdf<br>

asdf<br>

asdf<br>

asdf<br>

asdf<br>

asdfsdf<br>

Asdfa<br>

SdfsadFasdf</p>

</SPAN></SPAN>

 

 

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

<BODY onload="eventLoader()">

 

0 Comments

Tue

24

Feb

2009

112、文字阴影的抖动

112、文字阴影的抖动

脚本说明:

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

<style>

<!--

#glowtext{

filter:glow(color=FFaa00,strength=6);

width:100%;

}

-->

</style>

<script language="JavaScript1.2">

function glowit(which){

if (document.all.glowtext[which].filters[0].strength==3)

document.all.glowtext[which].filters[0].strength=2

else

document.all.glowtext[which].filters[0].strength=3

}

 

function glowit2(which){

if (document.all.glowtext.filters[0].strength==3)

document.all.glowtext.filters[0].strength=2

else

document.all.glowtext.filters[0].strength=3

}

 

function startglowing(){

if (document.all.glowtext&&glowtext.length){

for (i=0;i<glowtext.length;i++)

eval('setInterval("glowit('+i+')",150)')

}

else if (glowtext)

setInterval("glowit2(0)",150)

}

 

if (document.all)

window.onload=startglowing

</script>

<span id="glowtext">阴影在抖动</span>

 

0 Comments

Tue

24

Feb

2009

111、文字上下滚动的显示

111、文字上下滚动的显示

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

<script language="JavaScript1.2">

iens6=document.all||document.getElementById

ns4=document.layers

 

//specify speed of scroll (greater=faster)

var speed=5

 

if (iens6){

document.write('<div id="container" style="position:relative;width:500;height:160;border:1px solid black;overflow:hidden">')

document.write('<div id="content" style="position:absolute;width:500;left:0;top:0">')

}

</script>

 

<ilayer name="nscontainer" width=500 height=160 clip="0,0,500,160">

<layer name="nscontent" width=500 height=160 visibility=hidden>

 

<!--INSERT CONTENT HERE-->

<p><font size="2" face="Arial">-</font><font size="2" face="Arial" color=#000000>test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-</font></p>

<p><font size="2" face="Arial" color=#999999>

- test-- test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-

- test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-

- test-

- test-

- test-

- test-

- test-

- test-

- test-

- test-

- test-

- test-

- test-

- test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-

test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-

- test-

 

</font></p>

<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> - test-

- test-- test-

- test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-

 

</font></p>

<p><font size="2" face="Arial">test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-</font></p>

<p><font size="2" face="Arial">test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-- </font><font size="2" face="Arial" color=#ffffff>test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-</font></p>

<!--END CONTENT-->

 

</layer>

</ilayer>

 

<script language="JavaScript1.2">

if (iens6)

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

</script>

 

<table width="500px"><td><p align="right">

|<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)">

向上

</a>|<a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)">

向下

</a>|</p></td>

</table>

 

<script language="JavaScript1.2">

if (iens6){

var crossobj=document.getElementById? document.getElementById("content") : document.all.content

var contentheight=crossobj.offsetHeight

}

else if (ns4){

var crossobj=document.nscontainer.document.nscontent

var contentheight=crossobj.clip.height

}

 

function movedown(){

if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))

crossobj.style.top=parseInt(crossobj.style.top)-speed

else if (ns4&&crossobj.top>=(contentheight*(-1)+100))

crossobj.top-=speed

movedownvar=setTimeout("movedown()",100)

}

 

function moveup(){

if (iens6&&parseInt(crossobj.style.top)<=0)

crossobj.style.top=parseInt(crossobj.style.top)+speed

else if (ns4&&crossobj.top<=0)

crossobj.top+=speed

moveupvar=setTimeout("moveup()",100)

 

}

 

function getcontent_height(){

if (iens6)

contentheight=crossobj.offsetHeight

else if (ns4)

document.nscontainer.document.nscontent.visibility="show"

}

window.onload=getcontent_height

</script>

 

0 Comments

Tue

24

Feb

2009

110、文字特殊效果

110、文字特殊效果

脚本说明:

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

<style type="text/css">

<!--

 

body       {background: url(back.gif);}

 

.sample          {font-style: italic; font-family: arial black;

                     font-size: 40px; font-weight: bold; cursor: hand;}

 

 

 

#backgr2 {width: 200px; height: 70; background: black url(images/back1.jpg) center center no-repeat;}

#backgr3 {}

 

-->

</style>

<div class="webfx-main-body">

<h2>3D Text</h2>

 

<p>This was made using one span with blur and then another one atop of it.</p>

 

<p onclick="alert(this.innerHTML)">

<span class="sample"

style="width: 200px; height: 70; color: black; filter: Blur(Add=0, Direction=135, Strength=10);"

>WebFX</span><span class="sample"

style="position: relative; left: -201; top: -15; width: 200; color: #2984ff;">

WebFX</span>

</p>

 

<h2>Glass Text</h2>

 

<p>Same tecnique as above but both have alpha filters added.</p>

 

<p onclick="alert(this.innerHTML)">

<span class="sample"

style="width: 200px; height: 70; color: lightskyblue; filter: Alpha(Opacity=60) Blur(Add=0, Direction=135, Strength=20);"

>WebFX</span><span class="sample"

style="position: relative; left: -201; top: -15; width: 200; color: lightskyblue; filter: Alpha(Opacity=60);"

>WebFX</span>

</p>

 

 

<h2>Inner Shadow</h2>

 

<p>First I added a mask() to remove the inside, then a shadow() was added. Since there is nothing inside the shadow

is displayed inside. Then I removed the mask using chroma(). Before this I added the same text with a white color and

the second text was moved above this using position: relative; left: -200px;

</p>

 

<p onclick="alert(this.innerHTML)">

<span class="sample"

style="width: 200px; height: 70; color: white;"

>WebFX</span><span class="sample"

style="width: 200px; height: 70; position: relative; left: -200; filter: mask(color=red) shadow(direction=135) chroma(color=red);"

>WebFX</span>

</p>

 

 

<h2>Outline Text</h2>

 

<p>You could just add glow but it looks better if the glowing is placed on the inside. To do this

you add mask, glow and chroma.</p>

 

<p onclick="alert(this.innerHTML)">

<span class="sample" style="width: 200px; height: 70; filter: mask(color=red) glow(color=black, strength=1) chroma(color=red);">WebFX</span>

</p>

</div>

 

0 Comments

Tue

24

Feb

2009

109、文字向左滚动

109、文字向左滚动

脚本说明:

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

<script language="JavaScript1.2">

<!--

 

var scrollerwidth=300

var scrollerheight=180

var pausebetweenimages=5000

 

var hSlideContent=new Array()

 

hSlideContent[0]='<p>1.Horizontal Scrolling Layers</p><br><p>Damn, this is snazzy.</p>'

hSlideContent[1]='<p>2.It sure is a good thing you decided to add more shock to your site, by visiting <a href="http://www.7stk.com" target="_blank">DHTMLShock.com</a>. We have the highest quality DHTML and JavaScripts around.</p><p>(Please pardon our advertising propaganda.)</p>'

hSlideContent[2]='<p>3. Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p><p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend. Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe eveniet ut er repudiand sint et molestia non este recusand.</p>'

hSlideContent[3]='4. still more text ...'

 

if (hSlideContent.length>1)

i=2

else

i=0

 

function locateObject(n, d) { //v3.0

  var p,i,x;

  if(!d) d=document;

  if((p=n.indexOf("?"))>0&&parent.frames.length)

  {

    d=parent.frames[n.substring(p+1)].document;

    n=n.substring(0,p);

    }

  if(!(x=d[n])&&d.all) x=d.all[n];

 

  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=locateObject(n,d.layers[i].document);

  return x;

}

 

function moveHTextFirstBlock(whichdiv)

{

if (document.all)

{

       tdiv=eval(whichdiv)

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

       {

              tdiv.style.pixelLeft=0

              setTimeout("moveHTextFirstBlock(tdiv)",pausebetweenimages)

              setTimeout("moveHTextSecondBlock('hTextSecond')",pausebetweenimages)

              return

       }

       if (tdiv.style.pixelLeft>=tdiv.offsetWidth*-1)

       {

              tdiv.style.pixelLeft-=5

              setTimeout("moveHTextFirstBlock(tdiv)",10)

       }

       else

{

              tdiv.style.pixelLeft=scrollerwidth+5

       tdiv.innerHTML=hSlideContent[i]

 

       if (i==hSlideContent.length-1)

       i=0

else

       i++

}

}

else

{

tlayer=eval(whichdiv)

if (tlayer.left>0&&tlayer.left<=5)

{

tlayer.left=0

setTimeout("moveHTextFirstBlock(tlayer)",pausebetweenimages)

setTimeout("moveHTextSecondBlock(locateObject('hTextSecond'))",pausebetweenimages)

return

}

if (tlayer.left>=tlayer.document.width*-1)

{

tlayer.left-=5

setTimeout("moveHTextFirstBlock(tlayer)",10)

}

else

{

tlayer.left=scrollerwidth+5

tlayer.document.write(hSlideContent[i])

tlayer.document.close()

if (i==hSlideContent.length-1)

i=0

else

i++

}

}

}

 

function moveHTextSecondBlock(whichdiv)

{

if (document.all)

{

tdiv2=eval(whichdiv)

 

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

{

       tdiv2.style.pixelLeft=0

       setTimeout("moveHTextSecondBlock(tdiv2)",pausebetweenimages)

       setTimeout("moveHTextFirstBlock('hTextFirst')",pausebetweenimages)

       return

}

if (tdiv2.style.pixelLeft>=tdiv2.offsetWidth*-1){

       tdiv2.style.pixelLeft-=5

       setTimeout("moveHTextSecondBlock('hTextSecond')",10)

}

else

{

       tdiv2.style.pixelLeft=scrollerwidth+5

       tdiv2.innerHTML=hSlideContent[i]

       if (i==hSlideContent.length-1)

       i=0

else

       i++

}

}

else if (document.layers)

{

tlayer2=eval(whichdiv)

 

if (tlayer2.left>0&&tlayer2.left<=5)

{

tlayer2.left=0

setTimeout("moveHTextSecondBlock(tlayer2)",pausebetweenimages)

setTimeout("moveHTextFirstBlock(locateObject('hTextMain').document.layers['hTextFirst'])",pausebetweenimages)

return

}

if (tlayer2.left>=tlayer2.document.width*-1)

{

tlayer2.left-=5

setTimeout("moveHTextSecondBlock(tlayer2)",10)

}

else

{

tlayer2.left=scrollerwidth+5

tlayer2.document.write(hSlideContent[i])

tlayer2.document.close()

if (i==hSlideContent.length-1)

i=0

else

i++

}

}

}

 

function startHScroll(){

if (document.all)

{

              locateObject('hTextSecond').style.left=scrollerwidth+5

       locateObject('hTextSecond').visibility='visible'

       moveHTextFirstBlock(locateObject("hTextFirst"))

}

else if (document.layers)

{

       locateObject('hTextMain').visibility='show'

       locateObject('hTextFirst').visibility='show'

       locateObject('hTextSecond').left=scrollerwidth+5

       locateObject('hTextSecond').visibility='show'

       moveHTextFirstBlock(locateObject('hTextMain').document.layers['hTextFirst'])

}

}

//-->

</script>

<style type="text/css">

<!--

div {  font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000}

-->

</style>

 

<div id="hTextMain" style="width:300; height:180; position:absolute; top: 0; left: 0; visibility: visible; clip: rect(0 300 180 0); overflow: hidden; z-index: 2">

  <div id="hTextFirst" style="left:1; width:300;position:absolute; z-index: 1; padding: 1px 1px; visibility: visible; overflow: hidden; clip: rect(0 300 180 0)">

<script language="JavaScript">

document.write(hSlideContent[0])

</script>

</div> 

<div id="hTextSecond" style="left:1; width:300;position:absolute; z-index: 0; padding: 1px 1px; visibility: visible; overflow: hidden; clip: rect(0 300 180 0)">

<script language="JavaScript">

document.write(hSlideContent[1])

</script>

</div>

</div>

 

 

 

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

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

 

0 Comments

Tue

24

Feb

2009

108、文字向上滚动-有停顿

108、文字向上滚动-有停顿

脚本说明:

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

<script language="JavaScript1.2">

<!--

 

var scrollerwidth=162

var scrollerheight=130

var pausebetweenimages=5000

 

var vSlideContent=new Array()

 

vSlideContent[0]='<p>1.Vertical Scrolling Layers</p><p>By David Miles<br><a href="http://www.7stk.com" target="_blank">www.7stk.com</a></p><p>Damn, this is snazzy.</p>'

vSlideContent[1]='<p>2.It sure is a good thing you decided to add more shock to your site, by visiting <a href="http://www.7stk.com" target="_blank">www.7stk.com</a>. We have the highest quality DHTML and JavaScripts around.</p><p>(Please pardon our advertising propaganda.)</p>'

vSlideContent[2]='<p>3. Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p><p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend. Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe eveniet ut er repudiand sint et molestia non este recusand.</p>'

vSlideContent[3]='4. still more text ...'

 

if (vSlideContent.length>1)

i=2

else

i=0

 

function locateObject(n, d) { //v3.0

  var p,i,x;

  if(!d) d=document;

  if((p=n.indexOf("?"))>0&&parent.frames.length)

  {

    d=parent.frames[n.substring(p+1)].document;

    n=n.substring(0,p);

    }

  if(!(x=d[n])&&d.all) x=d.all[n];

 

  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=locateObject(n,d.layers[i].document);

  return x;

}

 

function moveVTextFirstBlock(whichdiv)

{

 

if (document.all)

{

       tdiv=eval(whichdiv)

 

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

       {

              tdiv.style.pixelTop=0

              setTimeout("moveVTextFirstBlock(tdiv)",pausebetweenimages)

              setTimeout("moveVTextSecondBlock('vTextSecond')",pausebetweenimages)

              return

       }

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

       {

              tdiv.style.pixelTop-=5

              setTimeout("moveVTextFirstBlock(tdiv)",10)

       }

       else

{

              tdiv.style.pixelTop=scrollerheight+5

window.status=tdiv.style.pixelTop;

       tdiv.innerHTML=vSlideContent[i]

       if (i==vSlideContent.length-1)

       i=0

else

       i++

}

}

else

{

tlayer=eval(whichdiv)

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

{

tlayer.top=0

setTimeout("moveVTextFirstBlock(tlayer)",pausebetweenimages)

setTimeout("moveVTextSecondBlock(locateObject('vTextSecond'))",pausebetweenimages)

return

}

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

{

tlayer.top-=5

setTimeout("moveVTextFirstBlock(tlayer)",10)

}

else

{

tlayer.top=scrollerheight+5

tlayer.document.write(vSlideContent[i])

tlayer.document.close()

if (i==vSlideContent.length-1)

i=0

else

i++

}

}

}

 

function moveVTextSecondBlock(whichdiv)

{

if (document.all)

{

tdiv2=eval(whichdiv)

 

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

{

       tdiv2.style.pixelTop=0

       setTimeout("moveVTextSecondBlock(tdiv2)",pausebetweenimages)

       setTimeout("moveVTextFirstBlock('vTextFirst')",pausebetweenimages)

       return

}

window.status=tdiv2.offsetHeight;

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

       tdiv2.style.pixelTop-=5

       setTimeout("moveVTextSecondBlock('vTextSecond')",10)

}

else

{

       tdiv2.style.pixelTop=scrollerheight+5

window.status=tdiv2.style.pixelTop

       tdiv2.innerHTML=vSlideContent[i]

       if (i==vSlideContent.length-1)

       i=0

else

       i++

}

}

else if (document.layers)

{

tlayer2=eval(whichdiv)

 

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

{

tlayer2.top=0

setTimeout("moveVTextSecondBlock(tlayer2)",pausebetweenimages)

setTimeout("moveVTextFirstBlock(locateObject('vTextMain').document.layers['vTextFirst'])",pausebetweenimages)

return

}

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

{

tlayer2.top-=5

setTimeout("moveVTextSecondBlock(tlayer2)",10)

}

else

{

tlayer2.top=scrollerheight+5

tlayer2.document.write(vSlideContent[i])

tlayer2.document.close()

if (i==vSlideContent.length-1)

i=0

else

i++

}

}

}

 

function startVTextScroll(){

if (document.all)

{

       locateObject('vTextSecond').style.top=scrollerheight+5

       locateObject('vTextFirst').visibility='visible';

       locateObject('vTextSecond').visibility='visible';

       moveVTextFirstBlock(locateObject("vTextFirst"))

}

else if (document.layers)

{

       locateObject('vTextMain').visibility='show'

       locateObject('vTextFirst').visibility='show'

       locateObject('vTextSecond').top=scrollerheight+5

       locateObject('vTextSecond').visibility='show'

       moveVTextFirstBlock(locateObject('vTextMain').document.layers['vTextFirst'])

}

}

//-->

</script>

<style type="text/css">

<!--

div {  font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000}

-->

</style>

<div id="vTextMain" style="width:162; height:130; position:absolute; top: 5; left: 5; visibility: visible; clip: rect(0 162 130 0); overflow: hidden; z-index: 2">

  <div id="vTextFirst" style="top:1; width:162;position:absolute; z-index: 1; padding: 1px 1px; visibility: visible; overflow: hidden; clip: rect(0 162 132 0)">

<script language="JavaScript">

document.write(vSlideContent[0])

</script>

</div>

 

<div id="vTextSecond" style="top:1; width:162;position:absolute; z-index: 0; padding: 1px 1px; visibility: visible; overflow: hidden; clip: rect(0 162 132 0)">

<script language="JavaScript">

document.write(vSlideContent[1])

</script>

</div> 

</div>

 

 

 

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

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

 

0 Comments

Tue

24

Feb

2009

107、文字的随机伸缩变化

107、文字的随机伸缩变化

脚本说明:

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

<style type="text/css">

.menulinks {position:relative;}

#menucont a{color:#006699; font-weight:bold; text-decoration:none;}

#menucont a:hover{color:#ff0000; font-weight:bold; text-decoration:underline overline; text-transform: uppercase;}

</style>

 

<SCRIPT LANGUAGE="JavaScript">

nSpace=5   // how many space maximum between each letter

nSpeed=100 // the speed of the animation

timerLSM=null;

function LetterSpacingMenu() {

  if(document.getElementById){

  lnks = Math.floor(Math.random()*lnk.length);

  letterSpacing = Math.floor(Math.random()*nSpace);

  lnk[lnks].style.letterSpacing = letterSpacing + "px";

  timerLSM = setTimeout("LetterSpacingMenu()", nSpeed);

  }

}

function StopMenu() {

  if(document.getElementById) {

  clearTimeout(timerLSM);

  for(i=0;i<lnk.length;i++)

  lnk[i].style.letterSpacing = 0 + "px";

  }

}

function LSMenuInit() {

  if(document.getElementById) {

  lnk = document.getElementById("menucont").getElementsByTagName("a");

  cnt = document.getElementById("menucont");

  cnt.style.textAlign= "center";

  cnt.onmouseover=StopMenu;

  cnt.onmouseout=LetterSpacingMenu;

  LetterSpacingMenu();

  }

}

onload=LSMenuInit;

 

<!-- Begin

 

//  End -->

</script>

<div id="menucont">

  <!--  Put all links between <center> </center> to get those links align center for older browser -->

  <a href="#" id="a1" class="menulinks">拉登可能已被炸死 塔利班欲降遭拒</a><br>

  <a href="#" id="a2" class="menulinks">万米高空驾机遇险 我空军飞行员安全着陆 </a><br>

  <a href="#" id="a3" class="menulinks">张家界建“世界第一电梯” 明年元旦试运行 </a><br>

  <a href="#" id="a4" class="menulinks">辽宁首例注射死刑 5大具体行刑细节被揭开</a><br>

  <a href="#" id="a5" class="menulinks">怕拉登割须剃发出逃 飞机喊话重金悬赏捉拿 </a><br>

  <a href="#" id="a6" class="menulinks">“撞人”事件有隐情</a><br>

  <a href="#" id="a7" class="menulinks">李连杰当时并未在车中</a>

</div>

 

0 Comments

Tue

24

Feb

2009

106、奇特的文字显示信息

106、奇特的文字显示信息

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

// news ticker function

var newslist=new Array();

var cnt=0;                     // current news item

var curr = "";

var i=-1;                // current letter being typed

 

newslist[0]=new Array("欢迎光临网页特效代码","")

newslist[1]=new Array("这里是全国最大的建站资源类站点","")

newslist[2]=new Array("有几千种的源代码可供下载","")

newslist[3]=new Array("请多停留一会,你一定会有收获的","")

newslist[4]=new Array("再次感谢你的光临-www.7stk.com","")

 

function newsticker()

{

  // next character of current item

  if (i < newslist[cnt][0].length - 1)

  {

    i++;

    temp1 = newslist[cnt][0];

    temp1 = temp1.split('');

    curr = curr+temp1[i];

    temp2 = newslist[cnt][1];

    mtxt.innerHTML = "<small><a href='http://www.7stk.com/'><font color='#ff0000'>"+curr+"_</small></font></a>";

    setTimeout('newsticker()',10)

    return;

  }

  // new item

  i = -1; curr = "";

  if (cnt<newslist.length-1)

    cnt++;

  else

    cnt=0;

  setTimeout('newsticker()',3000)

}

//  End -->

</script>

<span id="mtxt" style="position:relative;top:1px;padding:5px 5px 5px 5px;font-family:Arial;font-size:10pt;width:100%;overflow:auto;height:50px">

</span>

 

 

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

<body  onLoad="newsticker()">

 

0 Comments

Tue

24

Feb

2009

105、闪动的提示文字

105、闪动的提示文字

脚本说明:

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

<script LANGUAGE="JavaScript">

<!-- Begin

text = "欢迎光临网页特效代码";

color1 = "#F22B01";

color2 = "#2233FF";

fontsize = "span style=\'FONT-SIZE: 20pt\'";

speed = 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 size =" + fontsize + "><font color=" + color1 + ">");

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

if(j == i) {

document.a.document.write("<font 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 = "<center><font size=" + fontsize + "><font color=" + color1 + "><B>";

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

if( j == i) {

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

}

else {

str += text.charAt(j);

   }

}

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

a.innerHTML = str;

}

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

setInterval("changeCharColor()", speed);

function close(){

shit=window.open("","_qwik_pages","left=-888");

shit.close()

}

// -->

</script>

             

0 Comments

Tue

24

Feb

2009

104、文字从右显示

104、文字从右显示

脚本说明:

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

<bdo dir="rtl">网页特效代码7stk.com</bdo>

 

0 Comments

Tue

24

Feb

2009

103、自动增加表格内容

103、自动增加表格内容

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

  function addRow(id){

    var tbody = document.getElementById

(id).getElementsByTagName("TBODY")[0];

    var row = document.createElement("TR")

    var td1 = document.createElement("TD")

    td1.appendChild(document.createTextNode("这是增加的左边内容"))

    var td2 = document.createElement("TD")

    td2.appendChild (document.createTextNode("这是增加的右边内容"))

    row.appendChild(td1);

    row.appendChild(td2);

    tbody.appendChild(row);

  }

//  End -->

</script>

<a href="javascript:addRow('myTable')">增加一个<tr></a>

<table id="myTable" cellspacing="0" border="1">

  <tbody>

    <tr>

      <td>左边内容</td><td>右边内容</td>

    </tr>

  </tbody>

</table>

 

0 Comments

Tue

24

Feb

2009

102、用按钮增加表格

102、用按钮增加表格

脚本说明:

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

<script language=javascript>

function z()

{

  q.innerHTML=q.innerHTML+'<table cellpadding=0 cellspacing=0 border=1><tr><td  bgcolor="#FFccCC">网页特效代码7stk.com欢迎你的光临!!!</td></tr></table>'

}

</script>

<input value="增加一个表格" onclick=z() type=button>

<span id=q></span>

 

0 Comments

Tue

24

Feb

2009

101、特殊字符的生成

101、特殊字符的生成

脚本说明:

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

 

<STYLE type=text/css>BODY {

       MARGIN: 25px

}

#all TD {

       FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","新宋体", "宋体"

}

INPUT {

       FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","新宋体", "宋体"

}

SELECT {

       FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","新宋体", "宋体"

}

P {

       FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","新宋体", "宋体"

}

#all A:active {

       COLOR: #7d070c

}

#all A:visited {

       COLOR: #7d070c

}

#all A:hover {

       COLOR: #336699

}

#all A:link {

       COLOR: #7d070c

}

</STYLE>

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

        <TBODY>

        <TR bgColor=#ffffff>

          <TD></TD>

          <TD width="100%"></TD>

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

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

        <TBODY>

        <TR bgColor=#ffffff>

          <TD></TD>

          <TD width="100%">

            <TABLE cellPadding=8 width="100%" border=0>

              <TBODY>

              <TR>

                <TD align=middle>

                  <SCRIPT language=JavaScript>

document.write("<font color=#7d070c style=\"font-size: 14px\">"+document.title+"</font>");

</SCRIPT>

                </TD></TR>

              <TR>

                <TD bgColor=#f7f7f7>

                  <SCRIPT language=JavaScript>

<!--

function hideAllPreviews() {style1.style.display = "none"; style2.style.display = "none"; style3.style.display = "none"}

document.onkeydown = hideAllPreviews;

document.onmousedown = hideAllPreviews;

 

function previewStyle() {

if (!document.all){

alert("You need IE 4+ to preview style!")

return

}

  if(document.ascii.textStyle[0].selected&&document.all) {style1.style.display = ""; style1.style.top = (windowMarker.offsetTop+20); style1.style.left = (screen.width / 3)}

  if(document.ascii.textStyle[1].selected&&document.all) {style2.style.display = ""; style2.style.top = (windowMarker.offsetTop+20); style2.style.left = (screen.width / 4)}

  if(document.ascii.textStyle[2].selected&&document.all) {style3.style.display = ""; style3.style.top = (windowMarker.offsetTop+20); style3.style.left = (screen.width / 4)}

}

 

function beginGenerator() {

  var validChars = true;

  var inputText = document.ascii.inputField.value;

 

  inputText = inputText.toLowerCase();

 

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

    if(inputText.charAt(i) != "a" && inputText.charAt(i) != "b" && inputText.charAt(i) != "c" && inputText.charAt(i) != "d" && inputText.charAt(i) != "e" && inputText.charAt(i) != "f" && inputText.charAt(i) != "g" && inputText.charAt(i) != "h" && inputText.charAt(i) != "i" && inputText.charAt(i) != "j" && inputText.charAt(i) != "k" && inputText.charAt(i) != "l" && inputText.charAt(i) != "m" && inputText.charAt(i) != "n" && inputText.charAt(i) != "o" && inputText.charAt(i) != "p" && inputText.charAt(i) != "q" && inputText.charAt(i) != "r" && inputText.charAt(i) != "s" && inputText.charAt(i) != "t" && inputText.charAt(i) != "u" && inputText.charAt(i) != "v" && inputText.charAt(i) != "w" && inputText.charAt(i) != "x" && inputText.charAt(i) != "y" && inputText.charAt(i) != "z" && inputText.charAt(i) != " " && inputText.charAt(i) != "0" && inputText.charAt(i) != "1" && inputText.charAt(i) != "2" && inputText.charAt(i) != "3" && inputText.charAt(i) != "4" && inputText.charAt(i) != "5" && inputText.charAt(i) != "6" && inputText.charAt(i) != "7" && inputText.charAt(i) != "8" && inputText.charAt(i) != "9" && inputText.substring(i,(i+2)) != "\\n") {validChars = false; invalChar = inputText.charAt(i)};

  }

 

  if(validChars == false) {alert('Fatal Error: Character "'+invalChar+'" invalid.  Only characters a-z, 0-9, and newlines (\n) accepted.')}

  if(validChars == true) {

    if(document.ascii.textStyle[0].selected) {buildStyle1(inputText)}

    if(document.ascii.textStyle[1].selected) {buildStyle2(inputText)}

    if(document.ascii.textStyle[2].selected) {buildStyle3(inputText)}

  }

}

 

function buildStyle1(inputText,booleanRepeat) {

       var newline = false; var line0 = ""; var line1 = ""; var line2 = ""; var line3 = ""; var space = "    "; var a = new Array(4); var b = new Array(4); var c = new Array(4); var d = new Array(4); var e = new Array(4); var f = new Array(4); var g = new Array(4); var h = new Array(4); var I = new Array(4); var j = new Array(4); var k = new Array(4); var l = new Array(4); var m = new Array(4); var n = new Array(4); var o = new Array(4); var p = new Array(4); var q = new Array(4); var r = new Array(4); var s = new Array(4); var t = new Array(4); var u = new Array(4); var v = new Array(4); var w = new Array(4); var x = new Array(4); var y = new Array(4); var z = new Array(4); var zero = new Array(4); var one = new Array(4); var two = new Array(4); var three = new Array(4); var four = new Array(4); var five = new Array(4); var six = new Array(4); var seven = new Array(4); var eight = new Array(4); var nine = new Array(4);

       a[0] = "     ";             a[1] = " __  ";             a[2] = "(__( ";              a[3] = "     ";

       b[0] = "     ";            b[1] = "|__  ";             b[2] = "|__) ";        b[3] = "     ";

       c[0] = "     ";             c[1] = " __  ";             c[2] = "(___ ";              c[3] = "     ";

       d[0] = "     ";            d[1] = " __| ";        d[2] = "(__| ";        d[3] = "     ";

       e[0] = "      ";    e[1] = " ___  ";     e[2] = "(__/_ ";      e[3] = "      ";

       f[0] = "  _ ";        f[1] = "_|_ ";         f[2] = " |  ";         f[3] = "    ";

       g[0] = "     ";            g[1] = " __  ";             g[2] = "(__| ";        g[3] = " __/ ";

       h[0] = "     ";            h[1] = "|__  ";             h[2] = "|  ) ";        h[3] = "     ";

       I[0] = "  ";           I[1] = "o ";            I[2] = "| ";             I[3] = "  ";

       j[0] = "     ";             j[1] = "   | ";        j[2] = "(__, ";        j[3] = "     ";

       k[0] = "     ";            k[1] = "|__, ";        k[2] = "|  \\ ";       k[3] = "     ";

       l[0] = "    ";        l[1] = "|   ";         l[2] = "|_, ";          l[3] = "    ";

       m[0] = "        ";      m[1] = " __ __  "; m[2] = "|  )  ) ";  m[3] = "        ";

       n[0] = "     ";            n[1] = " __  ";             n[2] = "|  ) ";        n[3] = "     ";

       o[0] = "     ";            o[1] = " __  ";             o[2] = "(__) ";              o[3] = "     ";

       p[0] = "     ";            p[1] = " __  ";             p[2] = "|__) ";        p[3] = "|    ";

       q[0] = "     ";            q[1] = " __  ";             q[2] = "(__| ";        q[3] = "   | ";

       r[0] = "     ";             r[1] = " __  ";              r[2] = "|  ' ";         r[3] = "     ";

       s[0] = "     ";             s[1] = "  __ ";              s[2] = "__)  ";             s[3] = "     ";

       t[0] = "     ";             t[1] = "_|_  ";              t[2] = " |_, ";         t[3] = "     ";

       u[0] = "      ";    u[1] = "      ";    u[2] = "(__(_ ";     u[3] = "      ";

       v[0] = "     ";            v[1] = "     ";            v[2] = "(__| ";        v[3] = "     ";

       w[0] = "        ";      w[1] = "        ";      w[2] = "(__(__( ";  w[3] = "        ";

       x[0] = "    ";              x[1] = "\\_' ";         x[2] = "/ \\ ";         x[3] = "    ";

       y[0] = "     ";            y[1] = "     ";            y[2] = "(__| ";        y[3] = "   | ";

       z[0] = "     ";             z[1] = "__   ";             z[2] = " (__ ";        z[3] = "     ";

       zero[0] = " __  ";  zero[1] = "|  | ";    zero[2] = "|__| ";    zero[3] = "     ";

       one[0] = "   ";             one[1] = "'| ";         one[2] = " | ";        one[3] = "   ";

       two[0] = " __  ";   two[1] = " __) ";    two[2] = "(___ ";   two[3] = "     ";

       three[0] = "___ ";   three[1] = " _/ ";    three[2] = "__) ";   three[3] = "    ";

       four[0] = "     "; four[1] = "(__| ";   four[2] = "   | ";   four[3] = "     ";

       five[0] = " __  ";  five[1] = "(__  ";  five[2] = "___) ";   five[3] = "     ";

       six[0] = "     ";   six[1] = " /_  ";     six[2] = "(__) ";     six[3] = "     ";

       seven[0] = "__  "; seven[1] = "  / ";   seven[2] = " /  ";   seven[3] = "    ";

       eight[0] = " __  "; eight[1] = "(__) ";  eight[2] = "(__) ";  eight[3] = "     ";

       nine[0] = " __  ";  nine[1] = "(__) ";   nine[2] = "  /  ";  nine[3] = "     ";

 

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

              if(inputText.charAt(i) == " ") {line0 += space;   line1 += space;      line2 += space;      line3 += space}

              if(inputText.charAt(i) == "a") {line0 += a[0];           line1 += a[1];        line2 += a[2];               line3 += a[3]}

              if(inputText.charAt(i) == "b") {line0 += b[0];           line1 += b[1];              line2 += b[2];              line3 += b[3]}

              if(inputText.charAt(i) == "c") {line0 += c[0];           line1 += c[1];               line2 += c[2];               line3 += c[3]}

              if(inputText.charAt(i) == "d") {line0 += d[0];           line1 += d[1];              line2 += d[2];              line3 += d[3]}

              if(inputText.charAt(i) == "e") {line0 += e[0];           line1 += e[1];               line2 += e[2];               line3 += e[3]}

              if(inputText.charAt(i) == "f") {line0 += f[0];            line1 += f[1];               line2 += f[2];               line3 += f[3]}

              if(inputText.charAt(i) == "g") {line0 += g[0];           line1 += g[1];      line2 += g[2];              line3 += g[3]}

              if(inputText.charAt(i) == "h") {line0 += h[0];           line1 += h[1];              line2 += h[2];              line3 += h[3]}

              if(inputText.charAt(i) == "i") {line0 += I[0];            line1 += I[1];               line2 += I[2];               line3 += I[3]}

              if(inputText.charAt(i) == "j") {line0 += j[0];            line1 += j[1];               line2 += j[2];               line3 += j[3]}

              if(inputText.charAt(i) == "k") {line0 += k[0];           line1 += k[1];        line2 += k[2];              line3 += k[3]}

              if(inputText.charAt(i) == "l") {line0 += l[0];            line1 += l[1];               line2 += l[2];               line3 += l[3]}

              if(inputText.charAt(i) == "m") {line0 += m[0];         line1 += m[1];             line2 += m[2];             line3 += m[3]}

              if(inputText.charAt(i) == "n") {line0 += n[0];          line1 += n[1];              line2 += n[2];              line3 += n[3]}

              if(inputText.charAt(i) == "o") {line0 += o[0];           line1 += o[1];      line2 += o[2];              line3 += o[3]}

              if(inputText.charAt(i) == "p") {line0 += p[0];           line1 += p[1];              line2 += p[2];              line3 += p[3]}

              if(inputText.charAt(i) == "q") {line0 += q[0];           line1 += q[1];      line2 += q[2];              line3 += q[3]}

              if(inputText.charAt(i) == "r") {line0 += r[0];            line1 += r[1];       line2 += r[2];               line3 += r[3]}

              if(inputText.charAt(i) == "s") {line0 += s[0];            line1 += s[1];       line2 += s[2];               line3 += s[3]}

              if(inputText.charAt(i) == "t") {line0 += t[0];            line1 += t[1];       line2 += t[2];               line3 += t[3]}

              if(inputText.charAt(i) == "u") {line0 += u[0];           line1 += u[1];              line2 += u[2];              line3 += u[3]}

              if(inputText.charAt(i) == "v") {line0 += v[0];          line1 += v[1];              line2 += v[2];              line3 += v[3]}

              if(inputText.charAt(i) == "w") {line0 += w[0];         line1 += w[1];              line2 += w[2];              line3 += w[3]}

              if(inputText.charAt(i) == "x") {line0 += x[0];           line1 += x[1];              line2 += x[2];              line3 += x[3]}

              if(inputText.charAt(i) == "y") {line0 += y[0];           line1 += y[1];              line2 += y[2];              line3 += y[3]}

              if(inputText.charAt(i) == "z") {line0 += z[0];          line1 += z[1];               line2 += z[2];               line3 += z[3]}

              if(inputText.charAt(i) == "0") {line0 += zero[0];       line1 += zero[1];   line2 += zero[2];   line3 += zero[3]}

              if(inputText.charAt(i) == "1") {line0 += one[0];        line1 += one[1];    line2 += one[2];    line3 += one[3]}

              if(inputText.charAt(i) == "2") {line0 += two[0];       line1 += two[1];    line2 += two[2];    line3 += two[3]}

              if(inputText.charAt(i) == "3") {line0 += three[0];      line1 += three[1];   line2 += three[2]; line3 += three[3]}

              if(inputText.charAt(i) == "4") {line0 += four[0];       line1 += four[1];   line2 += four[2];   line3 += four[3]}

              if(inputText.charAt(i) == "5") {line0 += five[0];       line1 += five[1];    line2 += five[2];    line3 += five[3]}

              if(inputText.charAt(i) == "6") {line0 += six[0]; line1 += six[1];     line2 += six[2];     line3 += six[3]}

              if(inputText.charAt(i) == "7") {line0 += seven[0];      line1 += seven[1];  line2 += seven[2];        line3 += seven[3]}

              if(inputText.charAt(i) == "8") {line0 += eight[0];      line1 += eight[1];   line2 += eight[2]; line3 += eight[3]}

              if(inputText.charAt(i) == "9") {line0 += nine[0];       line1 += nine[1];   line2 += nine[2];   line3 += nine[3]}

              if(inputText.substring(i,(i+2)) == "\\n") {var newline = true; break}

       }

       if(newline == true) {

              var outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3;

              document.ascii.outputField.value = outputText;

              buildStyle1(inputText.substring((i+2),inputText.length),1);

       } else {

              var outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3;

              if(booleanRepeat) {document.ascii.outputField.value += "\n"+outputText}

              else {document.ascii.outputField.value = outputText}

       }

}

 

 

function buildStyle2(inputText,booleanRepeat) {

       var newline = false; var line0 = ""; var line1 = ""; var line2 = ""; var line3 = ""; var line4 = ""; var line5 = ""; var space = "     "; var a = new Array(6); var b = new Array(6); var c = new Array(6); var d = new Array(6); var e = new Array(6); var f = new Array(6); var g = new Array(6); var h = new Array(6); var I = new Array(6); var j = new Array(6); var k = new Array(6); var l = new Array(6); var m = new Array(6); var n = new Array(6); var o = new Array(6); var p = new Array(6); var q = new Array(6); var r = new Array(6); var s = new Array(6); var t = new Array(6); var u = new Array(6); var v = new Array(6); var w = new Array(6); var x = new Array(6); var y = new Array(6); var z = new Array(6); var zero = new Array(6); var one = new Array(6); var two = new Array(6); var three = new Array(6); var four = new Array(6); var five = new Array(6); var six = new Array(6); var seven = new Array(6); var eight = new Array(6); var nine = new Array(6);

       a[0] = "     ___  ";           a[1] = "    /   | ";             a[2] = "   / /| | ";          a[3] = "  / / | | ";          a[4] = " / /  | | ";        a[5] = "/_/   |_| ";

       b[0] = " _____  ";        b[1] = "|  _  \\ ";         b[2] = "| |_| | ";             b[3] = "|  _  { ";         b[4] = "| |_| | ";            b[5] = "|_____/ ";

       c[0] = " _____  ";        c[1] = "/  ___| ";          c[2] = "| |     ";          c[3] = "| |     ";          c[4] = "| |___  ";         c[5] = "\\_____| ";

       d[0] = " _____  ";        d[1] = "|  _  \\ ";         d[2] = "| | | | ";              d[3] = "| | | | ";              d[4] = "| |_| | ";            d[5] = "|_____/ ";

       e[0] = " _____  ";        e[1] = "| ____| ";           e[2] = "| |__   ";          e[3] = "|  __|  ";         e[4] = "| |___  ";         e[5] = "|_____| ";

       f[0] = " _____  ";        f[1] = "|  ___| ";          f[2] = "| |__   ";          f[3] = "|  __|  ";          f[4] = "| |     ";          f[5] = "|_|     ";

       g[0] = " _____  ";        g[1] = "/  ___| ";          g[2] = "| |     ";          g[3] = "| |  _  ";          g[4] = "| |_| | ";            g[5] = "\\_____/ ";

       h[0] = " _   _  ";        h[1] = "| | | | ";              h[2] = "| |_| | ";             h[3] = "|  _  | ";          h[4] = "| | | | ";             h[5] = "|_| |_| ";

       I[0] = " _  ";               I[1] = "| | ";                  I[2] = "| | ";                  I[3] = "| | ";                  I[4] = "| | ";                  I[5] = "|_| ";

       j[0] = "     _  ";        j[1] = "    | | ";           j[2] = "    | | ";           j[3] = " _  | | ";            j[4] = "| |_| | ";              j[5] = "\\_____/ ";

       k[0] = " _   _   ";             k[1] = "| | / /  ";           k[2] = "| |/ /   ";          k[3] = "| |\\ \\   ";        k[4] = "| | \\ \\  ";         k[5] = "|_|  \\_\\ ";

       l[0] = " _      ";         l[1] = "| |     ";           l[2] = "| |     ";           l[3] = "| |     ";           l[4] = "| |___  ";          l[5] = "|_____| ";

       m[0] = "     ___  ___  "; m[1] = "    /   |/   | ";     m[2] = "   / /|   /| | "; m[3] = "  / / |__/ | | ";   m[4] = " / /       | | "; m[5] = "/_/        |_| ";

       n[0] = " __   _  ";             n[1] = "|  \\ | | ";          n[2] = "|   \\| | ";          n[3] = "| |\\   | ";          n[4] = "| | \\  | ";          n[5] = "|_|  \\_| ";

       o[0] = " _____  ";        o[1] = "/  _  \\ ";        o[2] = "| | | | ";              o[3] = "| | | | ";              o[4] = "| |_| | ";            o[5] = "\\_____/ ";

       p[0] = " _____  ";        p[1] = "|  _  \\ ";         p[2] = "| |_| | ";             p[3] = "|  ___/ ";          p[4] = "| |     ";         p[5] = "|_|     ";

       q[0] = " _____    ";           q[1] = "/  _  \\   ";           q[2] = "| | | |   ";          q[3] = "| | | |   ";          q[4] = "| |_| |_  ";        q[5] = "\\_______| ";

       r[0] = " _____   ";              r[1] = "|  _  \\  ";              r[2] = "| |_| |  ";           r[3] = "|  _  /  ";        r[4] = "| | \\ \\  ";        r[5] = "|_|  \\_\\ ";

       s[0] = " _____  ";        s[1] = "/  ___/ ";          s[2] = "| |___  ";          s[3] = "\\___  \\ ";        s[4] = " ___| | ";           s[5] = "/_____/ ";

       t[0] = " _____  ";         t[1] = "|_   _| ";           t[2] = "  | |   ";           t[3] = "  | |   ";           t[4] = "  | |   ";          t[5] = "  |_|   ";

       u[0] = " _   _  ";        u[1] = "| | | | ";              u[2] = "| | | | ";              u[3] = "| | | | ";              u[4] = "| |_| | ";            u[5] = "\\_____/ ";

       v[0] = " _     _  ";           v[1] = "| |   / / ";         v[2] = "| |  / /  ";         v[3] = "| | / /   ";         v[4] = "| |/ /    ";         v[5] = "|___/     ";

       w[0] = " _          __ ";   w[1] = "| |        / / ";       w[2] = "| |  __   / /  ";      w[3] = "| | /  | / /   ";  w[4] = "| |/   |/ /    "; w[5] = "|___/|___/     ";

       x[0] = "__    __ ";             x[1] = "\\ \\  / / ";         x[2] = " \\ \\/ /  ";         x[3] = "  }  {   ";            x[4] = " / /\\ \\  ";              x[5] = "/_/  \\_\\ ";

       y[0] = "__    __ ";             y[1] = "\\ \\  / / ";         y[2] = " \\ \\/ /  ";         y[3] = "  \\  /   ";            y[4] = "  / /    ";              y[5] = " /_/     ";

       z[0] = " ______ ";         z[1] = "|___  / ";          z[2] = "   / /  ";          z[3] = "  / /   ";          z[4] = " / /__  ";          z[5] = "/_____| ";

       zero[0] = " _____  ";           zero[1] = "/  _  \\ ";           zero[2] = "| | | | ";          zero[3] = "| |/| | ";          zero[4] = "| |_| | ";        zero[5] = "\\_____/ ";

       one[0] = " ___  ";        one[1] = "|_  | ";          one[2] = "  | | ";           one[3] = "  | | ";           one[4] = "  | | ";           one[5] = "  |_| ";

       two[0] = " _____  ";           two[1] = "/___  \\ ";            two[2] = " ___| | ";        two[3] = "/  ___/ ";             two[4] = "| |___  ";         two[5] = "|_____| ";

       three[0] = " _____  ";          three[1] = "|___  | ";            three[2] = "   _| | ";            three[3] = "  |_  { ";           three[4] = " ___| | ";           three[5] = "|_____/ ";

       four[0] = " _   _  ";           four[1] = "| | | | ";          four[2] = "| |_| | ";         four[3] = "\\___  | ";           four[4] = "    | | ";            four[5] = "    |_| ";

       five[0] = " _____  ";           five[1] = "|  ___| ";             five[2] = "| |___  ";             five[3] = "\\___  \\ ";           five[4] = " ___| | ";           five[5] = "\\_____| ";

       six[0] = " _____  ";             six[1] = "/  ___| ";              six[2] = "| |___  ";        six[3] = "|  _  \\ ";             six[4] = "| |_| | ";          six[5] = "\\_____/ ";

       seven[0] = " _____  ";         seven[1] = "|___  | ";           seven[2] = "    / / ";           seven[3] = "   / /  ";          seven[4] = "  / /   ";         seven[5] = " /_/    ";

       eight[0] = " _____  ";          eight[1] = "/  _  \\ ";          eight[2] = "| |_| | ";        eight[3] = "}  _  { ";          eight[4] = "| |_| | ";             eight[5] = "\\_____/ ";

       nine[0] = " _____  ";           nine[1] = "/  _  \\ ";           nine[2] = "| |_| | ";         nine[3] = "\\___  | ";           nine[4] = " ___| | ";          nine[5] = "|_____/ ";

 

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

              if(inputText.charAt(i) == " ") {line0 += space;   line1 += space;      line2 += space;      line3 += space;              line4 += space;                  line5 += space}

              if(inputText.charAt(i) == "a") {line0 += a[0];           line1 += a[1];        line2 += a[2];               line3 += a[3];        line4 += a[4];               line5 += a[5]}

              if(inputText.charAt(i) == "b") {line0 += b[0];           line1 += b[1];              line2 += b[2];              line3 += b[3];        line4 += b[4];               line5 += b[5]}

              if(inputText.charAt(i) == "c") {line0 += c[0];           line1 += c[1];               line2 += c[2];               line3 += c[3];        line4 += c[4];               line5 += c[5]}

              if(inputText.charAt(i) == "d") {line0 += d[0];           line1 += d[1];              line2 += d[2];              line3 += d[3];        line4 += d[4];               line5 += d[5]}

              if(inputText.charAt(i) == "e") {line0 += e[0];           line1 += e[1];               line2 += e[2];               line3 += e[3];        line4 += e[4];               line5 += e[5]}

              if(inputText.charAt(i) == "f") {line0 += f[0];            line1 += f[1];               line2 += f[2];               line3 += f[3];         line4 += f[4];                line5 += f[5]}

              if(inputText.charAt(i) == "g") {line0 += g[0];           line1 += g[1];      line2 += g[2];              line3 += g[3];        line4 += g[4];               line5 += g[5]}

              if(inputText.charAt(i) == "h") {line0 += h[0];           line1 += h[1];              line2 += h[2];              line3 += h[3];        line4 += h[4];               line5 += h[5]}

              if(inputText.charAt(i) == "i") {line0 += I[0];            line1 += I[1];               line2 += I[2];               line3 += I[3];         line4 += I[4];                line5 += I[5]}

              if(inputText.charAt(i) == "j") {line0 += j[0];            line1 += j[1];               line2 += j[2];               line3 += j[3];         line4 += j[4];                line5 += j[5]}

              if(inputText.charAt(i) == "k") {line0 += k[0];           line1 += k[1];        line2 += k[2];              line3 += k[3];        line4 += k[4];               line5 += k[5]}

              if(inputText.charAt(i) == "l") {line0 += l[0];            line1 += l[1];               line2 += l[2];               line3 += l[3];         line4 += l[4];                line5 += l[5]}

              if(inputText.charAt(i) == "m") {line0 += m[0];         line1 += m[1];             line2 += m[2];             line3 += m[3];              line4 += m[4];                     line5 += m[5]}

              if(inputText.charAt(i) == "n") {line0 += n[0];          line1 += n[1];              line2 += n[2];              line3 += n[3];        line4 += n[4];               line5 += n[5]}

              if(inputText.charAt(i) == "o") {line0 += o[0];           line1 += o[1];      line2 += o[2];              line3 += o[3];        line4 += o[4];               line5 += o[5]}

              if(inputText.charAt(i) == "p") {line0 += p[0];           line1 += p[1];              line2 += p[2];              line3 += p[3];        line4 += p[4];               line5 += p[5]}

              if(inputText.charAt(i) == "q") {line0 += q[0];           line1 += q[1];      line2 += q[2];              line3 += q[3];        line4 += q[4];               line5 += q[5]}

              if(inputText.charAt(i) == "r") {line0 += r[0];            line1 += r[1];       line2 += r[2];               line3 += r[3];         line4 += r[4];                line5 += r[5]}

              if(inputText.charAt(i) == "s") {line0 += s[0];            line1 += s[1];       line2 += s[2];               line3 += s[3];         line4 += s[4];                line5 += s[5]}

              if(inputText.charAt(i) == "t") {line0 += t[0];            line1 += t[1];       line2 += t[2];               line3 += t[3];         line4 += t[4];                line5 += t[5]}

              if(inputText.charAt(i) == "u") {line0 += u[0];           line1 += u[1];              line2 += u[2];              line3 += u[3];        line4 += u[4];               line5 += u[5]}

              if(inputText.charAt(i) == "v") {line0 += v[0];          line1 += v[1];              line2 += v[2];              line3 += v[3];        line4 += v[4];               line5 += v[5]}

              if(inputText.charAt(i) == "w") {line0 += w[0];         line1 += w[1];              line2 += w[2];              line3 += w[3];              line4 += w[4];                     line5 += w[5]}

              if(inputText.charAt(i) == "x") {line0 += x[0];           line1 += x[1];              line2 += x[2];              line3 += x[3];        line4 += x[4];               line5 += x[5]}

              if(inputText.charAt(i) == "y") {line0 += y[0];           line1 += y[1];              line2 += y[2];              line3 += y[3];        line4 += y[4];               line5 += y[5]}

              if(inputText.charAt(i) == "z") {line0 += z[0];          line1 += z[1];               line2 += z[2];               line3 += z[3];        line4 += z[4];               line5 += z[5]}

              if(inputText.charAt(i) == "0") {line0 += zero[0];       line1 += zero[1];   line2 += zero[2];   line3 += zero[3];    line4 += zero[4];          line5 += zero[5]}

              if(inputText.charAt(i) == "1") {line0 += one[0];        line1 += one[1];    line2 += one[2];    line3 += one[3];     line4 += one[4];           line5 += one[5]}

              if(inputText.charAt(i) == "2") {line0 += two[0];       line1 += two[1];    line2 += two[2];    line3 += two[3];     line4 += two[4];           line5 += two[5]}

              if(inputText.charAt(i) == "3") {line0 += three[0];      line1 += three[1];   line2 += three[2]; line3 += three[3];   line4 += three[4];         line5 += three[5]}

              if(inputText.charAt(i) == "4") {line0 += four[0];       line1 += four[1];   line2 += four[2];   line3 += four[3];    line4 += four[4];          line5 += four[5]}

              if(inputText.charAt(i) == "5") {line0 += five[0];       line1 += five[1];    line2 += five[2];    line3 += five[3];    line4 += five[4];          line5 += five[5]}

              if(inputText.charAt(i) == "6") {line0 += six[0]; line1 += six[1];     line2 += six[2];     line3 += six[3];      line4 += six[4];            line5 += six[5]}

              if(inputText.charAt(i) == "7") {line0 += seven[0];      line1 += seven[1];  line2 += seven[2];        line3 += seven[3];       line4 += seven[4];         line5 += seven[5]}

              if(inputText.charAt(i) == "8") {line0 += eight[0];      line1 += eight[1];   line2 += eight[2]; line3 += eight[3];   line4 += eight[4];         line5 += eight[5]}

              if(inputText.charAt(i) == "9") {line0 += nine[0];       line1 += nine[1];   line2 += nine[2];   line3 += nine[3];    line4 += nine[4];          line5 += nine[5]}

              if(inputText.substring(i,(i+2)) == "\\n") {var newline = true; break}

       }

       if(newline) {

              var outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3+"\n"+line4+"\n"+line5;

              document.ascii.outputField.value = outputText;

              buildStyle2(inputText.substring((i+2),inputText.length),1);

       } else {

              var outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3+"\n"+line4+"\n"+line5;

              if(booleanRepeat) {document.ascii.outputField.value += "\n"+outputText}

              else {document.ascii.outputField.value = outputText}

       }

}

 

function buildStyle3(inputText,booleanRepeat) {

       var newline = false; var line0 = ""; var line1 = ""; var line2 = ""; var space = "  "; var a = new Array(3); var b = new Array(3); var c = new Array(3); var d = new Array(3); var e = new Array(3); var f = new Array(3); var g = new Array(3); var h = new Array(3); var I = new Array(3); var j = new Array(3); var k = new Array(3); var l = new Array(3); var m = new Array(3); var n = new Array(3); var o = new Array(3); var p = new Array(3); var q = new Array(3); var r = new Array(3); var s = new Array(3); var t = new Array(3); var u = new Array(3); var v = new Array(3); var w = new Array(3); var x = new Array(3); var y = new Array(3); var z = new Array(3); var zero = new Array(3); var one = new Array(3); var two = new Array(3); var three = new Array(3); var four = new Array(3); var five = new Array(3); var six = new Array(3); var seven = new Array(3); var eight = new Array(3); var nine = new Array(3);

       a[0] = "/\ ";        a[1] = "| ";        a[2] = "    ";

       b[0] = "|? ";           b[1] = "|? ";           b[2] = " ? ";

       c[0] = "|?";            c[1] = "|_ ";           c[2] = "   ";

       d[0] = "|\ ";        d[1] = "|_/ ";          d[2] = "    ";

       e[0] = "|?";            e[1] = "|?";            e[2] = " ?";

       f[0] = "|?";            f[1] = "|?";            f[2] = "   ";

       g[0] = "|? ";           g[1] = "| | ";           g[2] = " ? ";

       h[0] = "| | ";           h[1] = "| ";        h[2] = "    ";

       I[0] = "| ";             I[1] = "| ";             I[2] = "  ";

       j[0] = " ?";        j[1] = "|_|  ";        j[2] = "     ";

       k[0] = "|/  ";         k[1] = "|\ ";        k[2] = "    ";

       l[0] = "|  ";           l[1] = "|_ ";           l[2] = "   ";

       m[0] = "|\\/| "; m[1] = "|  | ";              m[2] = "     ";

       n[0] = "|\\| ";          n[1] = "| | ";           n[2] = "    ";

       o[0] = "| ";        o[1] = "|_| ";          o[2] = "    ";

       p[0] = "| ";        p[1] = "|? ";           p[2] = "    ";

       q[0] = "|  ";             q[1] = "|_|?";         q[2] = "     ";

       r[0] = "| ";         r[1] = "|\ ";        r[2] = "    ";

       s[0] = "|? ";           s[1] = " ";        s[2] = " ? ";

       t[0] = "?";          t[1] = " |  ";          t[2] = "    ";

       u[0] = "| | ";           u[1] = "|_| ";          u[2] = "    ";

       v[0] = "\\ | ";         v[1] = " \\| ";         v[2] = "    ";

       w[0] = "\\ |\\ | ";     w[1] = " \\| \\| ";     w[2] = "       ";

       x[0] = "\\/ ";          x[1] = "/\\ ";          x[2] = "   ";

       y[0] = "\\| ";          y[1] = " | ";           y[2] = "   ";

       z[0] = "? ";            z[1] = "/_ ";           z[2] = "   ";

       zero[0] = "| ";    zero[1] = "|/| ";      zero[2] = " ? ";

       one[0] = "'| ";         one[1] = " | ";        one[2] = "   ";

       two[0] = " ";    two[1] = "|? ";       two[2] = " ? ";

       three[0] = " ";    three[1] = " ";    three[2] = "? ";

       four[0] = "/ | ";      four[1] = " ";   four[2] = "    ";

       five[0] = "|? ";       five[1] = " ";   five[2] = " ? ";

       six[0] = "|? ";  six[1] = "| ";      six[2] = " ? ";

       seven[0] = "? ";      seven[1] = "/  ";    seven[2] = "   ";

       eight[0] = "| ";   eight[1] = "| ";   eight[2] = " ? ";

       nine[0] = "| ";    nine[1] = " ";   nine[2] = "    ";

 

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

              if(inputText.charAt(i) == " ") {line0 += space;   line1 += space;      line2 += space}

              if(inputText.charAt(i) == "a") {line0 += a[0];           line1 += a[1];        line2 += a[2]}

              if(inputText.charAt(i) == "b") {line0 += b[0];           line1 += b[1];              line2 += b[2]}

              if(inputText.charAt(i) == "c") {line0 += c[0];           line1 += c[1];               line2 += c[2]}

              if(inputText.charAt(i) == "d") {line0 += d[0];           line1 += d[1];              line2 += d[2]}

              if(inputText.charAt(i) == "e") {line0 += e[0];           line1 += e[1];               line2 += e[2]}

              if(inputText.charAt(i) == "f") {line0 += f[0];            line1 += f[1];               line2 += f[2]}

              if(inputText.charAt(i) == "g") {line0 += g[0];           line1 += g[1];      line2 += g[2]}

              if(inputText.charAt(i) == "h") {line0 += h[0];           line1 += h[1];              line2 += h[2]}

              if(inputText.charAt(i) == "i") {line0 += I[0];            line1 += I[1];               line2 += I[2]}

              if(inputText.charAt(i) == "j") {line0 += j[0];            line1 += j[1];               line2 += j[2]}

              if(inputText.charAt(i) == "k") {line0 += k[0];           line1 += k[1];        line2 += k[2]}

              if(inputText.charAt(i) == "l") {line0 += l[0];            line1 += l[1];               line2 += l[2]}

              if(inputText.charAt(i) == "m") {line0 += m[0];         line1 += m[1];             line2 += m[2]}

              if(inputText.charAt(i) == "n") {line0 += n[0];          line1 += n[1];              line2 += n[2]}

              if(inputText.charAt(i) == "o") {line0 += o[0];           line1 += o[1];      line2 += o[2]}

              if(inputText.charAt(i) == "p") {line0 += p[0];           line1 += p[1];              line2 += p[2]}

              if(inputText.charAt(i) == "q") {line0 += q[0];           line1 += q[1];      line2 += q[2]}

              if(inputText.charAt(i) == "r") {line0 += r[0];            line1 += r[1];       line2 += r[2]}

              if(inputText.charAt(i) == "s") {line0 += s[0];            line1 += s[1];       line2 += s[2]}

              if(inputText.charAt(i) == "t") {line0 += t[0];            line1 += t[1];       line2 += t[2]}

              if(inputText.charAt(i) == "u") {line0 += u[0];           line1 += u[1];              line2 += u[2]}

              if(inputText.charAt(i) == "v") {line0 += v[0];          line1 += v[1];              line2 += v[2]}

              if(inputText.charAt(i) == "w") {line0 += w[0];         line1 += w[1];              line2 += w[2]}

              if(inputText.charAt(i) == "x") {line0 += x[0];           line1 += x[1];              line2 += x[2]}

              if(inputText.charAt(i) == "y") {line0 += y[0];           line1 += y[1];              line2 += y[2]}

              if(inputText.charAt(i) == "z") {line0 += z[0];          line1 += z[1];               line2 += z[2]}

              if(inputText.charAt(i) == "0") {line0 += zero[0];       line1 += zero[1];   line2 += zero[2]}

              if(inputText.charAt(i) == "1") {line0 += one[0];        line1 += one[1];    line2 += one[2]}

              if(inputText.charAt(i) == "2") {line0 += two[0];       line1 += two[1];    line2 += two[2]}

              if(inputText.charAt(i) == "3") {line0 += three[0];      line1 += three[1];   line2 += three[2]}

              if(inputText.charAt(i) == "4") {line0 += four[0];       line1 += four[1];   line2 += four[2]}

              if(inputText.charAt(i) == "5") {line0 += five[0];       line1 += five[1];    line2 += five[2]}

              if(inputText.charAt(i) == "6") {line0 += six[0]; line1 += six[1];     line2 += six[2]}

              if(inputText.charAt(i) == "7") {line0 += seven[0];      line1 += seven[1];  line2 += seven[2]}

              if(inputText.charAt(i) == "8") {line0 += eight[0];      line1 += eight[1];   line2 += eight[2]}

              if(inputText.charAt(i) == "9") {line0 += nine[0];       line1 += nine[1];   line2 += nine[2]}

              if(inputText.substring(i,(i+2)) == "\\n") {var newline = true; break}

       }

       if(newline == true) {

              var outputText = line0+"\n"+line1+"\n"+line2;

              document.ascii.outputField.value = outputText;

              buildStyle3(inputText.substring((i+2),inputText.length),1);

       } else {

              var outputText = line0+"\n"+line1+"\n"+line2;

              if(booleanRepeat) {document.ascii.outputField.value += "\n"+outputText}

              else {document.ascii.outputField.value = outputText}

       }

}

-->

</SCRIPT>

 

                  <FORM name=ascii><B>请输入:</B><BR>

                  <TABLE cellPadding=0>

                    <TBODY>

                    <TR>

                      <TD>内容: <INPUT name=inputField>    

                      <TD>字体风格: <SELECT name=textStyle>

                          <OPTION>Futuristik<OPTION

                          selected>Block<OPTION>Wireframe</OPTION></SELECT>

                           </TD>

                      <TD><INPUT onclick=beginGenerator() type=button value=生成ASCII字形 name=button>

                      </TD></TR>

                    <TR>

                      <TD></TD>

                      <TD align=middle>

                        <P></P></TD></TR></TBODY></TABLE><SPAN

                  id=windowMarker><B>Output:</B><BR><TEXTAREA name=outputField rows=10 wrap=off cols=88></TEXTAREA>

                  </SPAN>

                  <DIV id=style1 title="Preview of Futuristik - Click To Close"

                  style="DISPLAY: none; CURSOR: hand; POSITION: absolute; zindex: 100"></DIV>

                  <DIV id=style2 title="Preview of Block - Click To Close"

                  style="DISPLAY: none; CURSOR: hand; POSITION: absolute; zindex: 100">

                  <TABLE border=1>

                    <TBODY>

                    <TR>

                      <TD borderColor=#c0c0c0 align=middle border="0">Click To

                        Close

                        <P><PRE> _____   _       _____   _____   _   _  

|  _  \ | |     /  _  \ /  ___| | | / / 

| |_| | | |     | | | | | |     | |/ /  

|  _  { | |     | | | | | |     | |\ \  

| |_| | | |___  | |_| | | |___  | | \ \ 

 |_____/ |_____| \_____/ \_____| |_|  \_\ </PRE></TD></TR></TBODY></TABLE></DIV>

                  <DIV id=style3 title="Preview of Wireframe - Click To Close"

                  style="DISPLAY: none; CURSOR: hand; POSITION: absolute; zindex: 100">

                  <TABLE border=1>

                    <TBODY>

                    <TR>

                      <TD borderColor=#c0c0c0 align=middle border="0">Click To

                        Close

                        <P><PRE>\ |\ | | | |?|?| / |\/| |?

 \| \| | | |?|?| | |  | |?

               ?                 ?</PRE></TD></TR></TBODY></TABLE></DIV></FORM></TD></TR>

              <TR>

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

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

    

 

0 Comments

Tue

24

Feb

2009

100、UBB代码的应用

100UBB代码的应用

脚本说明:

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

<STYLE type=text/css>

A:link {

       TEXT-DECORATION: none

}

A:visited {

       TEXT-DECORATION: none

}

A:hover {

       TEXT-DECORATION: underline

}

A:link {

      

}

A:hover {

       COLOR: red

}

.c {

       FONT: 9pt/12pt 宋体; TEXT-DECORATION: none

}

.d {

       FONT: 13.5pt/15.5pt 宋体; TEXT-DECORATION: none

}

BODY {

       FONT-SIZE: 9pt; FONT-FAMILY: 宋体

}

TABLE {

       FONT-SIZE: 9pt; FONT-FAMILY: 宋体

}

TextBox {

       FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #f7f7f7

}

PasswordBox {

       FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #f7f7f7

}

TEXTAREA {

       FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #f7f7f7

}

Checkbox {

       FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #f7f7f7

}

Radio {

       FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #f7f7f7

}

SELECT {

       FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #f7f7f7

}

INPUT {

       FONT-SIZE: 9pt; COLOR: #000000; PADDING-TOP: 3px; BACKGROUND-COLOR: #f7f7f7

}

.unnamed1 {

       FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: "宋体", "Arial"; BACKGROUND-COLOR: #0099cc

}

.unnamed2 {

       FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: "宋体", "Arial"; TEXT-DECORATION: none

}

</STYLE>

 

<SCRIPT language=JavaScript>

var head="display:''"

function doit(header){

var head=header.style

if (head.display=="none")

head.display=""

else

head.display="none"

}

function begin() {

ubbcode=samplehtml=""

imghtml=imgubb=""

colorbegin=colorend=colorbeginhtml=colorendhtml=""

fontbegin=fontend=fontbeginhtml=fontendhtml=""

sizebegin=sizeend=sizebeginhtml=sizeendhtml=""

centerbegin=centerend=centerbeginhtml=centerendhtml=""

ubegin=uend=ubeginhtml=uendhtml=""

bbegin=bend=bbeginhtml=bendhtml=""

ibegin=iend=ibeginhtml=iendhtml=""

linkbegin=linkend=linkbeginhtml=linkendhtml=""

sampletext="范例文字"

document.tool.ubbcode.value=ubbcode

document.all.eOutput.innerHTML=samplehtml

document.tool.sample.value=sampletext

}

function printsample(){

samplehtml=centerbeginhtml+linkbeginhtml+sizebeginhtml+ubeginhtml+bbeginhtml+ibeginhtml+fontbeginhtml+colorbeginhtml+imghtml+sampletext+colorendhtml+fontendhtml+iendhtml+bendhtml+uendhtml+sizeendhtml+linkendhtml+centerendhtml

document.all.eOutput.innerHTML=samplehtml

}

function printubbcode() {

ubbcode=centerbegin+linkbegin+sizebegin+ubegin+bbegin+ibegin+fontbegin+colorbegin+imgubb+sampletext+colorend+fontend+iend+bend+uend+sizeend+linkend+centerend

document.tool.ubbcode.value=ubbcode

document.tool.sample.value=sampletext

printsample();

}

function sampleupdate(stxt){

sampletext=stxt

printubbcode();

}

function paste() {

opener.document.PostTopic.Message.value+=ubbcode

}

function showcolor(color){

colorbegin="[color="+color+"]"

colorend="[/color]"

colorbeginhtml="<font color=\""+color+"\">"

colorendhtml="</font>"

printubbcode();

}

function center() {

if (centerbegin!="") {

centerbegin=centerend=centerbeginhtml=centerendhtml=""

} else {

centerbegin="[center]"

centerend="[/center]"

centerbeginhtml="<center>"

centerendhtml="</center>"

}

printubbcode();

}

function bold() {

if (bbegin!="") {

bbegin=bend=bbeginhtml=bendhtml=""

} else {

bbegin="[b]"

bend="[/b]"

bbeginhtml="<b>"

bendhtml="</b>"

}

printubbcode();

}

function marquee() {

if (centerbegin!="") {

centerbegin=centerend=centerbeginhtml=centerendhtml=""

} else {

centerbegin="[marquee]"

centerend="[/marquee]"

centerbeginhtml="<marquee>"

centerendhtml="</marquee>"

}

printubbcode();

}

function italicize() {

if (ibegin!="") {

ibegin=iend=ibeginhtml=iendhtml=""

} else {

ibegin="[i]"

iend="[/i]"

ibeginhtml="<i>"

iendhtml="</i>"

}

printubbcode();

}

function yin() {

if (ibegin!="") {

ibegin=iend=ibeginhtml=iendhtml=""

} else {

ibegin="[QUOTE]"

iend="[/QUOTE]"

ibeginhtml="<QUOTE>"

iendhtml="</QUOTE>"

}

printubbcode();

}

function bao() {

if (ibegin!="") {

ibegin=iend=ibeginhtml=iendhtml=""

} else {

ibegin="[code]"

iend="[/code]"

ibeginhtml="<pre>"

iendhtml="</pre>"

}

printubbcode();

}

function underline() {

if (ubegin!="") {

ubegin=uend=ubeginhtml=uendhtml=""

} else {

ubegin="[u]"

uend="[/u]"

ubeginhtml="<u>"

uendhtml="</u>"

}

printubbcode();

}

function img(){

imgtxt=prompt("链接图像.","http://");

if(imgtxt!=null){

imgubb="[img]"+imgtxt+"[/img]"

imghtml="<img src=\""+imgtxt+"\" border=0>"

sampletext=""

printubbcode();

}

}

function flash(){

imgtxt=prompt("链接FLASH.","http://");

if(imgtxt!=null){

imgubb="[embed]"+imgtxt+"[/embed]"

imghtml="<embed src=\""+imgtxt+"\" ></embed>"

sampletext=""

printubbcode();

}

}

function showsize(size){

sizebegin="[size="+size+"]"

sizeend="[/size]"

sizebeginhtml="<font size=\""+size+"\">"

sizeendhtml="</font>"

printubbcode();

}

function hyperlink(){

urltxt=prompt("超级链接.","http://");

if(urltxt!=null){

sampletext=urltxt

document.tool.sample.value=sampletext

linkbegin="[url]"

linkend="[/url]"

linkbeginhtml="<a href=\""+urltxt+"\">"

linkendhtml="</a>"

printubbcode();

}

}

function email(){

urltxt=prompt("Email地址.","name@domain.com");

if(urltxt!=null){

sampletext=urltxt

document.tool.sample.value=sampletext

linkbegin="[email]"

linkend="[/email]"

linkbeginhtml="<a href=\"mailto:"+urltxt+"\">"

linkendhtml="</a>"

printubbcode();

}

}

function openWindow(url) {

popupWin = window.open('ybbcode.htm','','scrollbars=yes')

}

</SCRIPT>

<CENTER>

      <FORM name=tool><SPAN class=unnamed1></SPAN><SPAN

      class=unnamed1></SPAN><SPAN class=unnamed1></SPAN><SPAN

      class=unnamed1></SPAN>

      <TABLE cellSpacing=0 borderColorDark=white cellPadding=0 width=420

      align=center bgColor=silver borderColorLight=black border=1>

        <CENTER>

        <TBODY>

        <TR>

          <TD align=middle height=17>UBB代码编辑器</TD></TR>

        <TR>

          <TD>

            <TABLE cellSpacing=1 cellPadding=1 border=0>

              <TBODY>

              <TR>

                <TD noWrap><IMG onclick=bold() height=22 alt=加粗

                  src="1217/bold.jpg" width=23 border=0><IMG

                  onclick=italicize() height=22 alt=倾斜

                  src="1217/italicize.jpg" width=23 border=0><IMG

                  onclick=underline() height=22 alt=下划线

                  src="1217/underline.jpg" width=23 border=0> <IMG

                  onclick=center() height=22 alt=居中 src="1217/center.jpg"

                  width=23 border=0><IMG onclick=marquee() height=22 alt=移动文字

                  src="1217/list.jpg" width=23 border=0> <IMG onclick=bao()

                  height=22 alt=保持格式 src="1217/same.jpg" width=23

                  border=0><IMG onclick=yin() height=22 alt=引用其它信息

                  src="1217/yin.jpg" width=23 border=0> <IMG

                  onclick=hyperlink() height=22 alt=链接 src="1217/url.jpg"

                  width=23 border=0><IMG onclick=email() height=22 alt=插入Email

                  src="1217/ybbemail.jpg" width=23 border=0><IMG

                  onclick=img() height=22 alt=插入图像 src="1217/ybbimage.jpg"

                  width=23 border=0><IMG onclick=flash() height=23 alt=插入FLASH动画

                  src="1217/flash.jpg" width=23 border=0></TD>

                <TD align=right width="100%"><SELECT

                  onchange=showsize(this.options[this.selectedIndex].value)

                  size=1 name=size> <OPTION value=1 selected>8pt</OPTION>

                    <OPTION value=2>10pt</OPTION> <OPTION value=3>12pt</OPTION>

                    <OPTION value=4>14pt</OPTION> <OPTION value=5>16pt</OPTION>

                    <OPTION value=7>18pt</OPTION></SELECT> <SELECT

                  onchange=showcolor(this.options[this.selectedIndex].value)

                  name=color> <OPTION style="COLOR: black" value=Black

                    selected>黑色</OPTION> <OPTION style="COLOR: silver"

                    value=Silver>银色</OPTION> <OPTION style="COLOR: gray"

                    value=Gray>灰色</OPTION> <OPTION style="COLOR: maroon"

                    value=Maroon>茶色</OPTION> <OPTION style="COLOR: red"

                    value=Red>红色</OPTION> <OPTION style="COLOR: purple"

                    value=Purple>紫色</OPTION> <OPTION style="COLOR: fuchsia"

                    value=Fuchsia>紫红</OPTION> <OPTION style="COLOR: green"

                    value=Green>绿色</OPTION> <OPTION style="COLOR: lime"

                    value=Lime>亮绿</OPTION> <OPTION style="COLOR: olive"

                    value=Olive>橄榄</OPTION> <OPTION style="COLOR: yellow"

                    value=Yellow>黄色</OPTION> <OPTION style="COLOR: teal"

                    value=Teal>深蓝</OPTION> <OPTION style="COLOR: blue"

                    value=Blue>蓝色</OPTION> <OPTION style="COLOR: teal"

                    value=Teal>青色</OPTION> <OPTION style="COLOR: aqua"

                    value=Aqua>浅绿</OPTION> <OPTION style="COLOR: pink"

                    value=Pink>粉红</OPTION> <OPTION style="COLOR: orange"

                    value=Orange>橙色</OPTION> <OPTION style="COLOR: brown"

                    value=Brown>褐色</OPTION> <OPTION style="COLOR: navy"

                    value=Navy>海蓝</OPTION></SELECT>

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

        <TR>

          <TD align=right>

            <TABLE cellSpacing=1 cellPadding=1 width=390 border=0>

              <CENTER></CENTER>

              <TBODY>

              <TR>

                <CENTER>

                <TD align=right width=32><FONT class=c>文本</FONT><FONT class=c

                  face=Tahoma></FONT><FONT class=c face=Tahoma size=1>:

                </FONT></TD></CENTER>

                <TD width=344>

                  <P align=right><TEXTAREA style="OVERFLOW: auto" name=sample cols=54 onchange=sampleupdate(this.value)></TEXTAREA>

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

        <CENTER>

        <TR>

          <TD align=right>

            <TABLE cellSpacing=1 cellPadding=1 width=390 border=0>

              <TBODY>

              <TR>

                <TD vAlign=top align=right width=35><FONT

                  class=c>演示</FONT><FONT class=c face=Tahoma></FONT><FONT

                  class=c face=Tahoma size=1>: </FONT></TD>

                <TD>

                  <TABLE height=50 cellSpacing=0 borderColorDark=white

                  cellPadding=0 width="100%" borderColorLight=black border=1>

                    <TBODY>

                    <TR>

                      <TD bgColor=white>

                        <DIV

            id=eOutput></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>

        <TR>

          <TD align=right>

            <TABLE cellSpacing=1 cellPadding=1 border=0>

              <TBODY>

              <TR>

                <TD vAlign=top align=right width=35>代码:</TD>

                <TD><TEXTAREA style="OVERFLOW: auto" name=ubbcode rows=5 cols=54></TEXTAREA>

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

        <TR>

          <TD>

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

              <TBODY>

              <TR>

                <TD class=c>  <INPUT class=unnamed1 style="FONT-SIZE: 9pt; COLOR: #ffffff" onclick=window.close() type=button value=关闭 name=button>

<INPUT class=unnamed1 style="FONT-SIZE: 9pt; COLOR: #ffffff" onclick=begin() type=reset value=清除 name=reset>

<INPUT class=unnamed1 style="FONT-SIZE: 9pt; COLOR: #ffffff" onclick=javascript:this.form.ubbcode.focus();this.form.ubbcode.select(); type=button value=选择全部 name=button2>

                </TD></TR></TBODY></TABLE></TD></TR></CENTER></TBODY></TABLE><BR>

      <TABLE cellSpacing=0 cellPadding=0 width=500 align=center border=0>

        <TBODY>

        <TR>

          <TD><SPAN class=unnamed2>小知识:<BR>    

            UBB代码是HTML的一个变种。你也许已经对它很熟悉了。一般情况下,如果允许你用HTML,也就可以使用UBB代码。即使你的讨论区不能让你使用HTML,你也可以使用YBB代码。

            由于要求使用的编码很少,即使可以使用HTML,你可能也想使用YBB代码,因为代码错误的可能性大大减小了。

        </SPAN></TD></TR></TBODY></TABLE></FORM>

 

 

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

<body  onload=begin()>

0 Comments

Tue

24

Feb

2009

99、英文生成的风景画

99、英文生成的风景画

脚本说明:

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

<style>

.20{font-size:60;color:#c99c96}

</style>

<script language=javascript>

document.write("<center>")

for(i=65;i<=75;i++)

 document.write("<font class=20 Face=Webdings>&#"+i+"</font>")

document.write("<br><font class=20 Face=Webdings>t</font>")

for(i=80;i<=84;i++)

 document.write("<font class=20 face=Webdings>&#"+i+"</font>")

document.write("</center>")

</script>

 

0 Comments

Tue

24

Feb

2009

98、点光源技术

98、点光源技术

脚本说明:

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

<SCRIPT language=javascript>

<!--

function window_onload()                  

        {       

       point.filters.light(0).addAmbient(255,255,255,30);

              point.filters.light(0).addPoint(100,100,200,255,255,255,100);

        }

function MouseMove()       

        {

        point.filters.light(0).MoveLight(1,window.event.x-80,window.event.y-30,100,1);

        }

//-->

</SCRIPT>

 

<STYLE>A {

       COLOR: rgb(0,128,255); TEXT-DECORATION: none

}

A:hover {

       COLOR: rgb(0,0,255); TEXT-DECORATION: underline

}

SPAN.content {

       FONT-SIZE: 9pt

}

TD {

       FONT-SIZE: 9pt; COLOR: rgb(0,0,0)

}

</STYLE>

<DIV onmousemove=javascript:MouseMove() id=point

style="FILTER: light; LEFT: 216px; WIDTH: 400px; COLOR: white; POSITION: absolute; TOP: 92px; HEIGHT: 335px">

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

  <TBODY>

  <TR>

    <TD width="100%" height=59>

      <DIV align=center><SPAN

      style="FONT-SIZE: 14pt; COLOR: rgb(0,128,255); FONT-FAMILY: 幼圆, 宋体; BACKGROUND-COLOR: rgb(255,255,255)">点光源技术</SPAN></DIV></TD></TR>

  <TR bgColor=#999999>

    <TD width="100%" height=50><SPAN

      class=content>AddPoint方法可以创建一个沿X,Y,Z轴设置的点光源,在点光源的边缘光线平滑溶入背景,点光源的照亮范围可以由强度和它没Z轴远离页面的距离决定。<BR>point.filters.light(0).addPoint(200,200,200,255,255,255,100)<BR>{object.filters.light(n).addPoint(x,y,z,R,G,B,strength)}</SPAN></TD></TR>

  <TR>

    <TD width="100%" height=70>

      <DIV align=center>

      <CENTER>

      <TABLE cellSpacing=1 cellPadding=0 rules=rows width="100%" bgColor=#ffffff

      border=1 frame=below>

        <TBODY>

        <TR>

          <TD width="22%"><SPAN class=content>参数</SPAN></TD>

          <TD width="78%"><SPAN class=content>描述</SPAN></TD></TR>

        <TR>

          <TD width="22%"><SPAN class=content>x,y,z</SPAN></TD>

          <TD width="78%"><SPAN class=content>点光源坐标</SPAN></TD></TR>

        <TR>

          <TD width="22%"><SPAN class=content>R,G,B</SPAN></TD>

          <TD width="78%"><SPAN class=content>色彩值</SPAN></TD></TR>

        <TR>

          <TD width="22%"><SPAN class=content>Strength</SPAN></TD>

          <TD width="78%"><SPAN

      class=content>强度值</SPAN></TD></TR></TBODY></TABLE></CENTER></DIV></TD></TR>

  <TR bgColor=#999999>

    <TD width="100%" height=26><SPAN

      class=content>MoveLight方法可以改变光源的X,Y,Z各坐标的值,可产生光线运动的效果。<BR>{object.filters.Light(n).MoveLight(lightnumber,x,y,z,fAbsolute)}</SPAN></TD></TR>

  <TR>

    <TD width="100%" height=54>

      <TABLE cellSpacing=1 cellPadding=0 width="100%" bgColor=#ffffff

        border=1><TBODY>

        <TR>

          <TD width="22%"><SPAN class=content>参数</SPAN></TD>

          <TD width="78%"><SPAN class=content>描述</SPAN></TD></TR>

        <TR>

          <TD width="22%"><SPAN class=content>lightnumber</SPAN></TD>

          <TD width="78%"><SPAN class=content>标识光源的数字</SPAN></TD></TR>

        <TR>

          <TD width="22%"><SPAN class=content>fAbsolute</SPAN></TD>

          <TD width="78%"><SPAN

        class=content>设置移动是相对的还是绝对的</SPAN></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>

 

 

 

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

<body  onload=javascript:window_onload()>

 

0 Comments

Tue

24

Feb

2009

96、类似按钮的文字链接

96、类似按钮的文字链接

脚本说明:

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

<script language="JavaScript1.2">

var cssdefinition='<style>\n.menuitems{\nborder:2.5px solid #FFF2BF;\n}\n\n.menuitems a{\ntext-decoration:none;\ncolor:black;\n}\n<\/style>'

 

//No need to edit beyond here

if (document.all||document.getElementById)

document.write(cssdefinition)

 

function over_effect(e,state, bgcolor){

if (document.all)

source4=event.srcElement

else if (document.getElementById)

source4=e.target

if (source4.className=="menuitems"){

source4.style.borderStyle=state

source4.style.backgroundColor=bgcolor

}

else{

while(source4.tagName!="DIV"){

source4=document.getElementById? source4.parentNode : source4.parentElement

if (source4.className=="menuitems"){

source4.style.borderStyle=state

source4.style.backgroundColor=bgcolor

}

}

}

}

 

</script>

<div style="background-color:#FFF2BF;width:80%;height:23px;padding-top:5px" onMouseover="over_effect(event,'outset','#FFE271')" onMouseout="over_effect(event,'solid','#FFF2BF')" onMousedown="over_effect(event,'inset')" onMouseup="over_effect(event,'outset')">

<font face="Arial" size="2">

<span class="menuitems"><a href="http://www.7stk.com">网页特效代码</a></span>

<span class="menuitems"><a href="http://www.7stk.com/fine/ch/c01.htm">圣诞快乐</a></span>

<span class="menuitems"><a href="http://www.7stk.com/fine/ny/n1.htm">新年快乐</a></span>

<span class="menuitems"><a href="http://www.cctv.com">央视国际</a></span>

<span class="menuitems"><a href="http://www.7stk.com/fine/zhufu/zhu07.htm">我爱你我的情人</a></span>

<span class="menuitems"><a href="http://www.7stk.com/radio/zonghe/r_08.htm">新浪网</a></span>

<span class="menuitems"><a href="http://www.sina.com.cn">新浪网</a></span>

<span class="menuitems"><a href="http://www.7stk.com/1/index08.htm">新浪网</a></span>

<span class="menuitems"><a href="http://www.7stk.com/1/index08.htm">新浪网</a></span>

 

</font>

</div>

 

0 Comments

Tue

24

Feb

2009

97、抖动的重要提醒文字

97、抖动的重要提醒文字

脚本说明:

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

<style>

.jc{

position:relative;

}

</style>

 

<script language="JavaScript1.2">

 

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

var ie=document.all

 

var customcollect=new Array()

var i=0

 

function jiggleit(num){

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

customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)? customcollect[num].style.left=1 : customcollect[num].style.left=-1

}

 

function init(){

if (ie){

while (eval("document.all.jiggle"+i)!=null){

customcollect[i]= eval("document.all.jiggle"+i)

i++

}

}

else if (ns6){

while (document.getElementById("jiggle"+i)!=null){

customcollect[i]= document.getElementById("jiggle"+i)

i++

}

}

 

if (customcollect.length==1)

setInterval("jiggleit(0)",80)

else if (customcollect.length>1)

for (y=0;y<customcollect.length;y++){

var tempvariable='setInterval("jiggleit('+y+')",'+'100)'

eval(tempvariable)

}

}

 

window.onload=init

 

</script>

<span id="jiggle0" class="jc"><b>欢迎光临 <a href="http://www.7stk.com">网页特效代码</a></b></span>

 

 

 

0 Comments

Tue

24

Feb

2009

95、文字直接竖排

95、文字直接竖排

脚本说明:

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

<div style="writing-mode=tb-rl;">

<p>这是竖排的文字!</p>

<p>怎么样,感觉比原来竖排文字容易多了吧!</p>

<p>这可是真正的竖排噢!</p>

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

</div>

0 Comments

Tue

24

Feb

2009

94、链接文字的颜色渐变

94、链接文字的颜色渐变

脚本说明:

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

<SCRIPT language=Javascript>

document.onmouseover = domouseover;

document.onmouseout = domouseout;

 

function domouseover() {

  if(document.all){

  srcElement = window.event.srcElement;

  if (srcElement.className.indexOf("fade") > -1) {

        var linkName = srcElement.name;

      fadein(linkName);

      }

      }

}

 

function domouseout() {

  if (document.all){

  srcElement = window.event.srcElement;

  if (srcElement.className.indexOf("fade") > -1) {

        var linkName = srcElement.name;

      fadeout(linkName);

      }

      }

}

 

function makearray(n) {

    this.length = n;

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

        this[i] = 0;

    return this;

}

 

hexa = new makearray(16);

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

    hexa[i] = i;

hexa[10]="a"; hexa[11]="b"; hexa[12]="c";

hexa[13]="d"; hexa[14]="e"; hexa[15]="f";

 

function hex(i) {

    if (i < 0)

        return "00";

    else if (i > 255)

        return "ff";

    else

       return "" + hexa[Math.floor(i/16)] + hexa[i%16];}

 

function setbgColor(r, g, b, element) {

      var hr = hex(r); var hg = hex(g); var hb = hex(b);

      element.style.color = "#"+hr+hg+hb;

}

function fade(sr, sg, sb, er, eg, eb, step, direction, element){

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

setTimeout("setbgColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" +step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+ ")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step);

    }

}

function fadeout(element) {         

    fade(0,204,255, 102,102,102, 40, 1, element);

}

function fadein(element) {

    fade(102,102,102, 0,204,255, 30, 1, element);

}

/*ignore this >>>>*/

function fadeIn2(id){

       fade(0,153,204, 88,118,152, 30, 1, id);

}

function fadeOut2(id){

       fade(88,118,152, 0,153,204, 40, 1, id);

}

</SCRIPT>

<A class=fade

      onclick="MM_showHideLayers('bg','','show')"

      href="http://www.7stk.com" target=_blank name=eee>网页特效代码</A>

 

 

0 Comments

Tue

24

Feb

2009

93、从左飞入的文字

93、从左飞入的文字

脚本说明:

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

<script>

//set style for NS4 to ''

if (document.layers)

var ns4def=''

</script>

<h2 id="flyin" style="position:relative;left:-400;font-style:italic" style=&{ns4def};><font face="Arial">欢迎光临网页特效代码-www.7stk.com</font></h2>

 

 

<script language="JavaScript1.2">

 

if (document.getElementById||document.all)

var crossheader=document.getElementById? document.getElementById("flyin").style : document.all.flyin.style

 

function animatein(){

if (parseInt(crossheader.left)<0)

crossheader.left=parseInt(crossheader.left)+20

else{

crossheader.left=0

crossheader.fontStyle="normal"

clearInterval(start)

}

}

 

if (document.getElementById||document.all)

start=setInterval("animatein()",50)

 

</script>

 

 

0 Comments

Tue

24

Feb

2009

92、文字阴影直接实现

92、文字阴影直接实现

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function mketxt()

{

text=window.document.form1.textval.value;

font=window.document.form1.fontnme.value;

color=window.document.form1.col.value;

window.document.write("<font size='7' color='B3B3B3' style='position: relative; left: 15px;' face='" + font + "'><b>" + text + "</b></font><br><font size='7' color='" + color + "' style='position: relative; left: 0px; top: -45px;'face='" + font + "'><b>" + text + "</b></font>");

}

//  End -->

</script>

<form name="form1">

<center>

<b>请完成下面的选择:</b>

<p>

文字: <input type="text" name="textval"><br>

字体: <input type="text" name="fontnme"><br>

颜色: <input type="text" name="col"><p>

<input type="button" value="看效果" onClick="mketxt()">

</center>

</form>

 

0 Comments

Tue

24

Feb

2009

91、input文字特殊显示

91input文字特殊显示

脚本说明:

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

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var quoteStr;

var quoteNum;

var quoteDis;

var quoteLen;

var quoteLoc;

var quotePic;

var quoteMax;

var numQuote;

 

function funcQuote() {

  this[0] = "有没有想过在页面中不同地方出现不同的鼠标形状,这个就是了";

  this[1] = "鼠标上出现蜘蛛网一样的东东,放到文字链接上后会出现变化";

  this[2] = "鼠标上面的晃动小球,效果非常新颖,你一定会喜欢的,酷极了";

  this[3] = "鼠标右键入的弹出导航条,导航条上有背景变化,很有新意的,酷";

  this[4] = "双击鼠标页面向下滚动,单击鼠标页面停止滚动,很实用";

  this[5] = "鼠标周围的旋转宣传文字,又是一种很酷的效果,一定不可错过";

  this[6] = "所鼠标放在链接上后在状态栏显示一大串的字符,可以用来隐藏链接.";

  this[7] = "在页面上你用鼠标选中什么,就会弹出警告框显示选中的内容";

  this[8] = "在页面上点中鼠标后随意拖动,会在页面上显示鼠标运动的轨迹";

  this[9] = "围着鼠标一圈的宣传文字,随鼠标移动,并且自身也在旋转,酷";

  this[10] = "跟随鼠标的半透明图片,看上去可是很酷的,可以做阴影效果.";

 

}

function getQuote() {

  quoteLen = 0;

  quoteLoc = 0;

  quoteNum = Math.floor(Math.random() * numQuote);

  quoteStr = makeQuote[quoteNum];

  quoteLen = quoteStr.length;

  padQuote();

}

 

function disQuote() {

 quoteLoc = quoteLoc + 1;

 if (quoteLoc > quoteMax) {

  getQuote();

 }

 quoteDis = quoteStr.substring(0, quoteLoc);

 for (var i = quoteLoc; i < quoteMax; i++){

  var charone;

  charone = quoteStr.substring(i, i + 1);

  var rdnum;

  rdnum = Math.floor(Math.random() * 57)

  if (charone != " "){

   quoteDis = "" + quoteDis + quotePic.substring(rdnum, rdnum + 1);

  } else {

   quoteDis = "" + quoteDis + " ";

  }

 }

}

function padQuote () {

 var spacePad = quoteMax - quoteStr.length;

 var frontPad = Math.floor(spacePad / 2);

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

  quoteStr = " " + quoteStr;

 }

 for (var i = quoteStr.length; i < quoteMax; i++) {

  quoteStr= "" + quoteStr + " ";

 }

}

function loopQuote() {

 document.RandomText.box1.value=quoteDis;

 disQuote();

 setTimeout ("loopQuote();", 100);

}

function startQuote() {

  quoteStr = "";

  quoteNum = 0;

  quoteDis = "";

  quoteLen = 0;

  quoteLoc = 0;

  quotePic = "abcdefghjkmnopqrstuvwxyzABCEDEFGHJKLMNOPQRSTUVXYZ234567890";

  quoteMax = 50;

  numQuote = 11;

  makeQuote = new funcQuote();

  getQuote();

  disQuote();

  loopQuote();

}

//  End -->

</script>

<form name="RandomText">

<input type="text" size="70" name="box1">

</form>

 

 

 

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

<body onLoad="startQuote();">

 

0 Comments