Advertisement
thuechen

RAINBOW

Jun 4th, 2015
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <!-- this script got from www.htmlbestcodes.com-Coded by: RICHARD ENAGE -->
  2. <html>
  3. <head>
  4. </head>
  5. <body>
  6. <b>
  7.  
  8. <script>
  9. var text="RICHARD ENAGE" // YOUR TEXT
  10. var speed=80 // SPEED OF FADE
  11.  
  12. // ********** LEAVE THE NEXT BIT ALONE!
  13.  
  14.  
  15. if (document.all||document.getElementById){
  16. document.write('<span id="highlight">' + text + '</span>')
  17. var storetext=document.getElementById? document.getElementById("highlight") : document.all.highlight
  18. }
  19. else
  20. document.write(text)
  21. var hex=new Array("00","14","28","3C","50","64","78","8C","A0","B4","C8","DC","F0")
  22. var r=1
  23. var g=1
  24. var b=1
  25. var seq=1
  26. function changetext(){
  27. rainbow="#"+hex[r]+hex[g]+hex[b]
  28. storetext.style.color=rainbow
  29. }
  30. function change(){
  31. if (seq==6){
  32. b--
  33. if (b==0)
  34. seq=1
  35. }
  36. if (seq==5){
  37. r++
  38. if (r==12)
  39. seq=6
  40. }
  41. if (seq==4){
  42. g--
  43. if (g==0)
  44. seq=5
  45. }
  46. if (seq==3){
  47. b++
  48. if (b==12)
  49. seq=4
  50. }
  51. if (seq==2){
  52. r--
  53. if (r==0)
  54. seq=3
  55. }
  56. if (seq==1){
  57. g++
  58. if (g==12)
  59. seq=2
  60. }
  61. changetext()
  62. }
  63. function starteffect(){
  64. if (document.all||document.getElementById)
  65. flash=setInterval("change()",speed)
  66. }
  67. starteffect()
  68. </script>
  69. </b>
  70.  
  71. <br/>
  72. <p><a target="_blank" href="http://www.htmlbestcodes.com/"><span style="font-size: 8pt; text-decoration: none">HTML Best Codes</span></a></p>
  73. </body>
  74. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement