Escape single quotes(‘) in JavaScript

I have moved this post to my new Blog. Please click this link to read it.

Advertisements

6 Responses to “Escape single quotes(‘) in JavaScript”

  1. Umesh Says:

    its really superb…the solution was simple and straight fwd..it helped me a lot….

  2. Nischal Shetty Says:

    Hey there Umesh….I’m so glad that this post was of some help to you…. If at any point of time you do not understand any post or have any other Javascript related problems do leave a comment… It would be my pleasure to help you out 🙂

  3. anitha Says:

    Hi,

    What if i have like this

    He’s a great man

    In this case, how is the escape sequence work?

    hjhddfjslfdjsjflsjf

    function showtip(text)

    {
    alert(text);
    }

  4. Nischal Shetty Says:

    Hey Anitha… You can do this…

    var text = ‘He\’s a great man’;
    alert(text);

    Was this what you really had a doubt on? You can tell me the exact scenario if you’re still facing problems… I’ll try my best to help you out. ;o)

  5. Preethi Says:

    If the text value(with \’) is passed to the database, say MSSQL, it is not returning any value.

  6. laxmikanth Says:

    Hi, i am getting javascript issue with single quote in french translation value mots-clés ou appellation d’emploi. can you please help me to resolve the issue. i have tried with (\) back slash , but it was not resolved.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: