Results 1 to 5 of 5

Thread: Inverted Text Script

  1. #1
    Join Date
    Mar 2006
    Location
    UK, warwickshire
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Inverted Text Script

    OK this creation of mine is pointless but still you might have some use for it,

    i call it the Inverted Text

    Code:
    <script type="text/javascript">
    /********************************
    *Created by .Alias.
    *(c) .Alias.
    *This must not be removed
    ********************************/
    /////EDIT THIS TEXT AS IT IS THE TEXT THAT WILL BE DISPLAYED/////
    txt = "Hello, World!";
    /////EDIT THIS TEXT AS IT IS THE TEXT THAT WILL BE DISPLAYED/////
    
    /////DO NOT EDIT PAST HERE/////
    x = txt.length;
    i = 0;
    text = new Array();
    string = "";
    while (x >= i)
    {
    	text[i] = txt.charAt(x);
    	string = string + text[i];
    	x--;
    }
    document.write(string);
    </script>

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Hm.
    Code:
    String.prototype.reverse = function() {
      var r = "";
      for(var i=this.length-1;i>=0;i--) r += this.charAt(i);
      return r;
    }
    Last edited by Twey; 04-01-2006 at 02:52 PM. Reason: Whoops, used the wrong brackets for charAt().
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Location
    UK, warwickshire
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i knew you would do it an easyer way ow well nvm at keast i could do it in the first place normal i cant do anything

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Nice effort, though
    A note: if you're intending to submit something to DD, you have to explicitly allow copying of the script, or state your submission.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2006
    Location
    UK, warwickshire
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK but my scripts suck so there is not point in me submitting them to DD if you think i should submit one of the scripts i ever post let me know

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •