How to find and replace the quotes with escape characters in a string
Have a set of radio buttons with different values.
some time the values has quotes like No i don't.
So when i am trying to fetch the value of it, it is returning as No i don.
I need to know how to find if there is quotes in a string and replace it
with escape characters so that when i try to fetch the value it should
return me with the quotes.
HTML Code
<input type="radio" value="Yes" name="pollchoice">
<input type="radio" value="No" name="pollchoice">
<input type="radio" value="No, i don't" name="pollchoice">
In the above code, when third choice is selected and tried to get the
value of the selected radio button it returns as No, i don instead of No,
i don't
Thanks in advance
No comments:
Post a Comment