js标题滚动效果

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
 <title>我爱湖南</title>
  <script type="text/javascript">
        //效果:title文字向右滚动.
        //思路:把字符串分割成第一个和最后一部分.然后交换放置位置(把最后的部分放置到前面,第一部分放置到后面).
       setInterval(function (){
        var fLast=document.title.charAt(0);
        var others=document.title.substring(1,document.title.length);
        document.title=others+fLast;
     },1000);
  </script>
 </head>
 
 <body>    
 </body>
</html>

原文地址:https://www.cnblogs.com/nqsan/p/3182457.html