演
示
源
代
码
<script language="JavaScript"> <!-- Hide me //"index_count" is subtracted from "title_length" to get the first # of the substring method var index_count = 0; // What you want to scroll in the title bar var title_string = "
"; // length of title string var title_length = title_string.length; // Variable for setTimeout() var cmon; // Counter for clearTimeout() var kill_length = 0; function loopTheScroll() { scrollTheTitle(); // If greater than length of string then stop calling itself if(kill_length > title_length) { clearTimeout(cmon); } kill_length++; // Calls itself 10x per second - change the value to speed up or slow down the scroll (in 1/1000th of a second) cmon = setTimeout("loopTheScroll();",100) } function scrollTheTitle() { // Difficult to explain, must be familiar w/ the substring method var doc_title = title_string.substring((title_length - index_count - 1),title_length); // put doc_title in the title bar document.title = doc_title; index_count++; } loopTheScroll(); //--> </script>
Title状态栏
文本内容:
注释:放在<head>与</head>之间
当前位置:
首 页
→
JavaScript
→
状 态 栏
→Title状态栏
··万旭网站工作室 设计发布··