当前位置:编程学习 > JS >>

title栏文字变化显示,网页Title特效

一款由JavaScript小程序写的网页Title栏文字特效,把网页的Title文字改成一个一个渐变出现,在大家喜欢的好123网址之家网站,最初就有这种效果,喜欢个性网页的朋友可以用来定制你的个性化网页。
答案:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title栏变化弹出</title>
<body>
<script language="javascript">
<!-- Hide me
var index_count = 0;
var title_string = "欢迎光临站长资源库网站,是您设计主页的好帮手! ";
var title_length = title_string.length;
var cmon;
var kill_length = 0;
function loopTheScroll()
{
scrollTheTitle();
if(kill_length > title_length)

 {
 clearTimeout(cmon);

 }

kill_length++;
cmon = setTimeout("loopTheScroll();",100)

}
function scrollTheTitle()
{
var doc_title = title_string.substring((title_length - index_count - 1),title_length);
document.title = doc_title;
index_count++;

}

loopTheScroll();

//-->

</script>
</body>
</html>

上一个:网页页面平滑滚动jquery代码
下一个:循环气泡随机上升的JS特效代码

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,