LsevenTT博客-站群哥

认真你就输了

PHP 滚动标题

 

<html>

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

<title>lseven滚动标题</title>

<script language=”javascript”>

var title_string = “lseven让你的标题栏文字动起来,标题也动了”;

var title_length = title_string.length;

var index_count = 0;

var cmon;

 

function scrollTheTitle()

{

var doc_title = title_string.substring(index_count, title_length);

document.title = doc_title;

index_count++;

}

 

function loopTheScroll()

{

scrollTheTitle();

if(index_count >= title_length)

{

index_count = 0;

//clearTimeout(cmon);

}

cmon = setTimeout(“loopTheScroll();”,300)

}

loopTheScroll();

//–>

</script>

</head>

</html>

评论被关闭