Decoding a string in Javascript

Discussion in 'JavaScript' started by humanclone, Jun 11, 2008.

  1. #1
    I am having a hard time in decoding this string in javascript

    '


    I am using the following code
    _______________________
    text="'";
    var output=text.unescapeHTML();

    document.write(output);
    _______________________

    It shows '

    I would like to decode it further to just a single quote

    since entity code for single quote = '

    I tried to use the above function in a for loop but still it gives me same result.

    Any help would be greatly appreciated
     
    humanclone, Jun 11, 2008 IP
  2. rohan_shenoy

    rohan_shenoy Active Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #2
    rohan_shenoy, Jun 11, 2008 IP