等待有缘人
http://blog.sina.com.cn/wangcong615
[
订阅
]
博客
相册
音乐
播客
个人中心
首页
博文
收藏
博客圈
字体大小:
大
中
小
正文
标题栏(最上)跳动字符的特效代码 (4款)
(2006-11-27 01:02:20)
分类:
博客代码
代码一
<script><script language="JavaScript1.2"> title_tmp1=document.title if (title_tmp1.indexOf(">>")!=-1){ title_tmp2=title_tmp1.split(">>"); title_last=" —> "+title_tmp2[1]; title_last=title_last + " —> " + title_tmp2[2]; }else{ if (title_tmp1.indexOf("——")!=-1){ title_tmp2=title_tmp1.split("——"); title_last=" —> "+title_tmp2[1]; if (title_last==" —> "){title_last=" —> "}; if (title_last==" —> "){title_last=" —> "}; } else { title_last="(http://blog.sina.com.cn/m/xiaom)"} } title_new="小米空间"+title_last+"欢迎您的光临!!!" //中间的标题 step=0 function flash_title() { step++ if (step==7) {step=1} if (step==1) {document.title='★☆☆☆'+title_new+'☆☆☆★'} if (step==2) {document.title='☆★☆☆'+title_new+'☆☆★☆'} if (step==3) {document.title='☆☆★☆'+title_new+'☆★☆☆'} if (step==4) {document.title='☆☆☆★'+title_new+'★☆☆☆'} if (step==5) {document.title='☆☆★☆'+title_new+'☆★☆☆'} if (step==6) {document.title='☆★☆☆'+title_new+'☆☆★☆'} setTimeout("flash_title()",180); } flash_title() </script>
代码二
<script><script language="JavaScript1.2"> var message="小米空间欢迎你的光临,请多提意见,多給予本站支持!" //specifys the title var message=message+" " //gives a pause at the end,1 space=1 speed unit, here I used 10 spaces@150 each = 1.5seconds. i="0" //declares the variable and sets it to start at 0 var temptitle="" //declares the variable and sets it to have no value yet. var speed="150" //the delay in milliseconds between letters function titler(){ if (!document.all&&!document.getElementById) return document.title=temptitle+message.charAt(i) //sets the initial title temptitle=temptitle+message.charAt(i) //increases the title by one letter i++ //increments the counter if(i==message.length) //determines the end of the message { i="0" //resets the counter at the end of the message temptitle="" //resets the title to a blank value } setTimeout("titler()",speed) //Restarts. Remove line for no-repeat. } window.onload=titler </script>
代码三
<script><script language="JavaScript1.2"> var message = new Array(); // Set your messages you want typed into the title bar below. // To add more messages, just add more elements to the array. message[0] = "欢迎光临源小米空间★★★★"; message[1] = "我为你准备了大量的精选的网页特效★★★★"; message[2] = "每一个特效都经过了严格的测试★★★★"; message[3] = "如果你在使用中有什么问题,请告诉我★★★★"; message[4] = "我会尽我的能力给你帮助★★★★"; // Set the number of repetitions (how many times a given message is typed out // before moving onto the next message). var reps = 1; var speed = 275;// Set the overall typing speed (larger number = slower action). var hold = 4 // set the length of time to display the whole phrase before retyping (larger number = longer) // DO NOT EDIT BELOW THIS LINE. var p = message.length; var q = 0; var r = 0; var C = 0; var mC = 0; var s = 0; var sT = null; if (reps < 1) { reps = 1; } function setMessage() { typing = message[mC]; q = typing.length; r = q + hold; typeMessage(); } function typeMessage() { if (s > r) { s = 0; } if (s > q) { document.title = '★★★★'+ typing +' - - -'; } else { document.title = '★★★★'+ typing.substr(0,s)+' - - -'; } if (C < (r * reps)) { sT = setTimeout("typeMessage()", speed); C++; s++; } else { C = 0; s = 0; mC++; if(mC > p - 1) {mC = 0;} sT = null; setMessage(); } } setMessage(); // End --> </script>
代码四
<script><script language="JavaScript1.2"> step=0 function flash_title() { step++ if (step==5) {step=1} if (step==1) {document.title=' ◆◇◇小米空间 http://blog.sina.com.cn/m/xiaom 欢迎您的到来!◇◇◆ '} if (step==2) {document.title=' ◇◆◇小米空间 http://blog.sina.com.cn/m/xiaom 欢迎您的到来!◇◆◇ '} if (step==3) {document.title=' ◇◇◆小米空间 http://blog.sina.com.cn/m/xiaom 欢迎您的到来!◆◇◇ '} if (step==4) {document.title=' ◇◆◇小米空间 http://blog.sina.com.cn/m/xiaom 欢迎您的到来!◇◆◇ '} setTimeout("flash_title()",400); } flash_title() </SCRIPT>
代码说明:
把里面的名字和博客地址改成你自己的即可,加进去看看效果吧
阅读
|
评论
|
收藏
|
打印
|
举报
前一篇:
3D效果图奇妙创意——视觉享受
后一篇:
页面左边滑出导航菜单
评论
重要提示:警惕虚假中奖信息,点击查看详情
[
发评论
]
评论加载中,请稍候...
发评论
明星私家相册
用户昵称:
插入表情
登录名:
密码:
找回密码
注册
昵 称:
匿名评论
验证码:
收听验证码
发评论
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。
相关博文
读取中...
推荐博文
读取中...
谁看过这篇博文
读取中...