home *** CD-ROM | disk | FTP | other *** search
/ PC User 2005 May / CD / PCU0505CD.iso / software / full / coffecup / files / html2005.exe / %MAINDIR% / Javascript / backwards.xml < prev    next >
Encoding:
Text File  |  2005-02-16  |  1.1 KB  |  46 lines

  1. <ccResource>
  2.   <ccTitle>
  3. Backwards Text
  4.   </ccTitle>
  5.   <ccCategory>
  6. Browser
  7.   </ccCategory>
  8.   <ccDescription>
  9. A script that makes any text display backwards.
  10.   </ccDescription>
  11.   <ccInstructions>
  12. The code goes only inside the BODY tags.  You can change the items below to suit your needs.
  13.   </ccInstructions>
  14.   <ccHeadContent>
  15.   
  16.   </ccHeadContent>
  17.   <ccBodyContent>
  18. <script language="JavaScript">
  19. <!-- This stops non-java browsers from going MAD
  20. /* MjM'S JAVA CODENAME = REVERSE
  21.  
  22. */
  23. var message1="Can you read what this text is saying? Obviously, you can!";
  24. var before = "<font color=black>"; 
  25. // You put the tags you want before the text here.
  26. var after = "</font>"; 
  27. // you put the closing tags here.
  28. var message2="";
  29. for (count=message1.length; count >= 0; count--)
  30. message2+=message1.substring(count,count-1);
  31. document.write (before,message2,after);
  32. // -->
  33. </script>
  34.  
  35.   </ccBodyContent>
  36.   <ccElementContent>
  37.   
  38.    <ccElementName></ccElementName>
  39.    <ccElementAction></ccElementAction>
  40.    
  41.   </ccElementContent>
  42.   <ccExtraData>
  43.  
  44.   </ccExtraData>
  45. </ccResource>
  46.