滚动标题

效果如上标题,代码如下:

<script language="javascript">
<!-- Hide me
var index_count = 0;
var title_string = "JavaScript让你的标题栏文字动起来,标题也动了,真有趣=====JavaScript让你的标题栏文字动起来,标题也动了,真有趣";
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>