Monday, January 18, 2016

Cara membuat Title Berjalan


Title Blog Berjalan
-----------------------------------
<script type="text/javascript">
      var msg = document.title;
      msg = " " + msg + " ";
      var speed = 5;
      var pos = 0;
      function movingTitle(){
       document.title = msg.substr(pos) + msg.substr(0, pos);
       pos++;
       if(pos == msg.length){pos = 0;}
       setTimeout("movingTitle()", 1000/speed);
      }
      movingTitle();
      </script>
=================================================================

No comments:

Post a Comment