Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JavaScript Code : Text Coloring Change
- This is a Special Javascript code . this code make a color text letter with nice effect . you can change letter and the speed . we suggest use this code on your weblog or website :)
- Three Wolf Moon T-Shirt: goo.gl/oTh1vy
- <script type='text/javascript' src='http://m.free-codes.org/g.php?id=2002'></script><body >
- <script type="text/javascript">
- var msg = 'Welcome To My Site '
- var colorTimer = null;
- function toHex(n){
- var hexChars = '0123456789ABCDEF';
- if (n == 0) return n;
- var j, k;
- var temp = '';
- while (n != 0){
- j = n % 16;
- n = (n - j)/16;
- temp = hexChars.charAt(j) + temp;
- }
- return temp;
- }
- function colorize(){
- if (!document.getElementById) return;
- for (i=0; i<msg.length; i++){
- k = Math.round(Math.random() * 16777215);
- k = toHex(k);
- while (k.length < 6){
- k = k + '0';
- }
- document.getElementById('colorizer' + i).style.color = '#' + k;
- }
- colorTimer = window.setTimeout('colorize()', 230);
- }
- </script>
- <BODY onload='colorize();'>
- <div id="text" style="font-size:35px ; font-family: 'Times New Roman', Courier, monospace; letter-spacing:normal; font-weight:bold; font-style:normal; text-align:center; padding-top:15px;">
- <script>
- for (var i=0; i<msg.length; i++){
- document.write("<span id ='colorizer" + i + "'>" + msg.charAt(i) + "</span>");
- }
- </script></div>
- </body><a target="_blank" href="http://free-web-tools.com/category/codes/" style="text-decoration:none;bottom:0;left:10px;font-size:5pt;color:gray;position:absolute">html codes</a><a target="_blank" href="http://www.javascriptbestcodes.com" style="font-size: 8pt; text-decoration: none">Javascript Codes</a>
- Three Wolf Moon T-Shirt: goo.gl/oTh1vy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement