源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

给blog添加效果(计数器、天气预报、精美flash时钟、跟随鼠标的萤火虫、跟随鼠标的文字、状态栏文本、副标

  • 时间:2021-07-16 09:53 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:给blog添加效果(计数器、天气预报、精美flash时钟、跟随鼠标的萤火虫、跟随鼠标的文字、状态栏文本、副标
示例:wjt2000@etang.com" >kvw3000@hotmail.com</A></SMALL></br></br> 来自:西安</br> -------------------------------</br> 访问量: <script language=JavaScript src="[url=http://www.1sucai.cn/article/6631.htm]http://laoan.com/counters/count.php?kvw3000"></script></br[/url]> ------------------------------- [b]2. 为Blog 添加“天气预报”功能[/b] <p><b>今日天气</b><br> <center><iframe width=157 height=240 frameborder=0 scrolling=NO src='http://appnews.qq.com/cgi-bin/news_qq_search?city='></iframe></center> 要更改默认省份的话,只要在city=的后面加就行了,不过那个省份在列表中要有。 将: city= 替换为: city=上海 就可以了,不过先看一下列表里面有没有上海这个城市,如果有的话再加。 [b]3.跟随鼠标的萤火虫 [/b]  以下是代码,无须修改 <script language="JavaScript"> if (!document.layers&&!document.all) event="test" function showtip2(current,e,text){ if (document.all&&document.readyState=="complete"){ document.all.tooltip2.innerHTML='<marquee style="border:1px solid black">'+text+'</marquee>' document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft+10 document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10 document.all.tooltip2.style.visibility="visible"} else if (document.layers){ document.tooltip2.document.nstip.document.write('<b>'+text+'</b>') document.tooltip2.document.nstip.document.close() document.tooltip2.document.nstip.left=0 currentscroll=setInterval("scrolltip()",100) document.tooltip2.left=e.pageX+10 document.tooltip2.top=e.pageY+10 document.tooltip2.visibility="show"}} function hidetip2(){ if (document.all) document.all.tooltip2.style.visibility="hidden" else if (document.layers){ clearInterval(currentscroll) document.tooltip2.visibility="hidden"}} function scrolltip(){ if (document.tooltip2.document.nstip.left>=-document.tooltip2.document.nstip.document.width) document.tooltip2.document.nstip.left-=5 else document.tooltip2.document.nstip.left=150} </script> <script language="JavaScript"> function YY_Layerfx(yyleft,yytop,yyfnx,yyfny,yydiv,yybilder,yyloop,yyto,yycnt,yystep) { //v1.2 if ((document.layers)||(document.all)){ with (Math) {yynextx= eval(yyfnx)} with (Math) {yynexty= eval(yyfny)} yycnt=(yyloop && yycnt>=yystep*yybilder)?0:yycnt+yystep; if (document.layers){ eval(yydiv+".top="+(yynexty+yytop)) eval(yydiv+".left="+(yynextx+yyleft)) } if (document.all){ eval("yydiv=yydiv.replace(/.layers/gi, '.all')"); eval(yydiv+".style.pixelTop="+(yynexty+yytop)); eval(yydiv+".style.pixelLeft="+(yynextx+yyleft)); } argStr='YY_Layerfx('+yyleft+','+yytop+',"'+yyfnx+'","'+yyfny+'","'+yydiv+'",'+yybilder+','+yyloop+','+yyto+','+yycnt+','+yystep+')'; if (yycnt<=yystep*yybilder){eval(yydiv+".yyto=setTimeout(argStr,yyto)");} }} function YY_Mousetrace(evnt) { if (yyns4) {if (evnt.pageX) {yy_ml=evnt.pageX; yy_mt=evnt.pageY;} } else{ yy_ml=(event.clientX + document.body.scrollLeft); yy_mt=(event.clientY + document.body.scrollTop);} if (yy_tracescript)eval(yy_tracescript)} </script> <script language="JavaScript"> function PopWin() { var PopWin = window.open("new.htm","PopWin","toolbar=no,directries=no,scrollBars=yes,height=350,width=400"); } </script> <body> <div id="tooltip2" style="position:absolute;visibility:hidden;clip:rect(0 150 50 0);width:150px;background-color:lightyellow"> <layer name="nstip" width="1000px" bgColor="lightyellow"> </layer> </div> <div id="yyd0" style="position:absolute; left:10px; top:50px; width:3px; height:3px; z-index:1; background-color: #19636c; layer-background-color: #19636c; border: 1px none #000000; clip: rect(0 3 3 0)"></div><div id="yyd1" style="position:absolute; left:20px; top:50px; width:3px; height:3px; z-index:1; background-color: #708574; layer-background-color: #708574; border: 1px none #000000; clip: rect(0 3 3 0)"></div><div id="yyd2" style="position:absolute; left:30px; top:50px; width:3px; height:3px; z-index:1; background-color: #379bbf; layer-background-color: #379bbf; border: 1px none #000000; clip: rect(0 3 3 0)"></div><div id="yyd3" style="position:absolute; left:40px; top:50px; width:3px; height:3px; z-index:1; background-color: #25184c; layer-background-color: #25184c; border: 1px none #000000; clip: rect(0 3 3 0)"></div><div id="yyd4" style="position:absolute; left:50px; top:50px; width:3px; height:3px; z-index:1; background-color: #31bd3c; layer-background-color: #31bd3c; border: 1px none #000000; clip: rect(0 3 3 0)"></div><div id="yyd5" style="position:absolute; left:60px; top:50px; width:3px; height:3px; z-index:1; background-color: #c11efd; layer-background-color: #c11efd; border: 1px none #000000; clip: rect(0 3 3 0)"></div><script> var yyns4=window.Event?true:false; var yy_mt = 0; var yy_ml = 0; document.onmousemove = YY_Mousetrace; yy_tracescript = ''; if (yyns4){ document.captureEvents(Event.mousemove); YY_Mousetrace('',',document.YY_Mousetrace1')} YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/39.83007847812662))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/34.224861639800686))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd0\']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/27.66510707209673))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/9.240632767417667))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd1\']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/16.45318944579641))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/16.0564452288292))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd2\']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/6.95348954836835))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/44.13697049887155))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd3\']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/33.90077294583733))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/2.2378828869411587))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd4\']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/37.858312521039835))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/18.083839795990098))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd5\']',2000,true,80,0,1); </script> </body>  [b]4.为Blog 添加“状态栏文本”功能[/b] <script language=JavaScript>  var MESSAGE="欢迎您亲自光临回家念经的小站            "  var POSITION=100  var DELAY=10  var scroll=new statusMessageObject()  function statusMessageObject(p,d)  {   this.msg =MESSAGE   this.out =" "   this.pos =POSITION   this.delay=DELAY   this.i=0   this.reset=clearMessage  }  function clearMessage()  {   this.pos=POSITION  }  function scroller()  {   for (scroll.i=0;scroll.i<scroll.pos;scroll.i++){   scroll.out += " "}   if (scroll.pos >= 0)   scroll.out += scroll.msg   else scroll.out=scroll.msg.substring(-scroll.pos,scroll.msg.length)   window.status=scroll.out   scroll.out=" "   scroll.pos--   if (scroll.pos < -(scroll.msg.length)) {   scroll.reset()}   setTimeout('scroller()',scroll.delay)  }  function snapIn(jumpSpaces,position)  {   var msg = scroll.msg   var out = ""   for(var i=0; i<position; i++)   {    out+= msg.charAt(i)   }   for(i=1;i<jumpSpaces;i++)   {    out += " "   }   out+=msg.charAt(position)   window.status = out   if(jumpSpaces <= 1)   {    position++    if(msg.charAt(position) == ' ')    {     position++    }    jumpSpaces = 100-position   }   else if (jumpSpaces >  3)   {    jumpSpaces *= .75   }   else   {    jumpSpaces--   }   if(position != msg.length)   {    var cmd = "snapIn(" + jumpSpaces + "," + position + ")";    scrollID = window.setTimeout(cmd,scroll.delay);   }   else   {    window.status=""    jumpSpaces=0    position=0    cmd = "snapIn(" + jumpSpaces + "," + position + ")";    scrollID = window.setTimeout(cmd,scroll.delay);    return false   }   return true  }  snapIn(100,0); </script> [b]5.为Blog 添加“跟随鼠标的文字”功能[/b] <style type="text/css"> .spanstyle {  position:absolute;  visibility:visible;  top:-500px;  font-size:10pt;  color: #0000ff;  font-weight:bold; } </style> <script>  var x,y  var step=15  var flag=0  var message="程序不过是梦"  message=message.split("")  var xpos=new Array()  for (i=0;i<=message.length;i++)  {   xpos[i]=-500  }  var ypos=new Array()  for (i=0;i<=message.length;i++)  {   ypos[i]=-500  }  function handlerMM(e)  {   x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX-5   y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY-75   flag=1  }  function makesnake()  {   if (flag==1 && document.all)   {    for (i=message.length; i>=1; i--)    {     xpos[i]=xpos[i-1]+step     ypos[i]=ypos[i-1]    }    xpos[0]=x+step    ypos[0]=y    for (i=0; i<message.length; i++)    {     var thisspan = eval("span"+(i)+".style")     thisspan.posLeft=xpos[i]     thisspan.posTop=ypos[i]    }   }   else if (flag==1 && document.layers)   {    for (i=message.length; i>=1; i--)    {     xpos[i]=xpos[i-1]+step     ypos[i]=ypos[i-1]    }    xpos[0]=x+step    ypos[0]=y    for (i=0; i<message.length; i++)    {     var thisspan = eval("document.span"+i)     thisspan.left=xpos[i]     thisspan.top=ypos[i]    }   }   var timer=setTimeout("makesnake()",30)  } </script> <body onLoad="makesnake()" > <script>  for (i=0;i<=message.length;i++)  {   document.write("<span id='span"+i+"'class='spanstyle'>")   document.write(message[i])   document.write("</span>")  }  if (document.layers)  {   document.captureEvents(Event.MOUSEMOVE);  }  document.onmousemove = handlerMM; </script> [b]6.给blog增加一个功能,每次打开的时候自动在顶部副标题位置显示一条格言[/b] (这个我没使用) <script language="javascript"> var word=new Array(); word[0]="当你感到悲哀痛苦时,最好是去学些什么东西。学习会使你永远立于不败之地。" word[1]="每一个成功者都有一个开始。勇于开始,才能找到成功的路。" word[2]="与其临渊羡鱼,不如退而结网。" word[3]="若不给自己设限,则人生中就没有限制你发挥的藩篱。" word[4]="绊脚石乃是进身之阶。" word[5]="即使爬到最高的山上,一次也只能脚踏实地地迈一步。" word[6]="积极思考造成积极人生,消极思考造成消极人生。" word[7]="人之所以有一张嘴,而有两只耳朵,原因是听的要比说的多一倍。" word[8]="别想一下造出大海,必须先由小河川开始。" word[9]="即使是不成熟的尝试,也胜于胎死腹中的策略。" word[10]="积极的人在每一次忧患中都看到一个机会,而消极的人则在每个机会都看到某种忧患。" word[11]="如果我们想要更多的玫瑰花,就必须种植更多的玫瑰树。" word[11]="世上没有绝望的处境,只有对处境绝望的人。" word[12]="当你感到悲哀痛苦时,最好是去学些什么东西。学习会使你永远立于不败之地。" word[13]="世界上那些最容易的事情中,拖延时间最不费力。" word[14]="没有口水与汗水,就没有成功的泪水。" word[15]="如果你希望成功,以恒心为良友,以经验为参谋,以小心为兄弟,以希望为哨兵。" word[16]="大多数人想要改造这个世界,但却罕有人想改造自己。" word[17]="未曾失败的人恐怕也未曾成功过。" word[18]="人生伟业的建立,不在能知,乃在能行。" word[19]="挫折其实就是迈向成功所应缴的学费。" word[20]="任何的限制,都是从自己的内心开始的。" word[21]="忘掉失败,不过要牢记失败中的教训。" word[22]="不是境况造就人,而是人造就境况。" document.all("header").innerHTML="<a href='http://babypai.vicp.net'><img src='http://babypai.vicp.net/linklogo.gif' border=0 alt='ジβаЪy派主页' align=right /></a><span>"+document.all("Header1_HeaderTitle").outerHTML+"<br/>    "+word[parseInt(Math.random()*22)]+"</span>" </script> [b]7. 给blog增加flash精美时钟[/b] 发现了很多绚丽的FLASH钟表,免费,没有广告的可以使用,颜色也可选择,安装也方便。 你可以预览后选择自己喜欢的。 刻度时钟: <EMBED SRC=http://www.butabon.com/Clock/clock_038.swf WIDTH=150 HEIGHT=150 wmode=transparent quality=high loop=true menu=false> 其中的[url=http://www.butabon.com/Clock/clock_038.swf]http://www.butabon.com/Clock/clock_038.swf[/url]是时钟的flash地址,可以在IE中预览,其中的038可以替换成000-039之间或者051-059之间的任何一个数字(全看个人喜好,呵呵) 数字时钟: 第一种风格: <EMBED SRC=http://www.butabon.com/Clock/digiwide019.swf WIDTH=150 HEIGHT=15 wmode=transparent quality=high loop=true menu=false> 其中的[url=http://www.butabon.com/Clock/digiwide019.swf]http://www.butabon.com/Clock/digiwide019.swf[/url]同样是时钟的flash地址,可以在IE中预览,其中的019可以替换成000-019之间之间的任何一个数字(同样全看个人喜好,呵呵) 第二种风格: <EMBED SRC=http://www.butabon.com/Clock/digital_019.swf WIDTH=150 HEIGHT=90 wmode=transparent quality=high loop=true menu=false> 其中的[url=http://www.butabon.com/Clock/digital_019.swf]http://www.butabon.com/Clock/digital_019.swf[/url]同样是时钟的flash地址,可以在IE中预览,其中的019可以替换成000-019之间之间的任何一个你可以在IE中可以成功预览的数字(请自己测试)。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部