[Javascript] If a string contains many ' and ", how to dealwithit injavascript?
BEKIM BACAJ
trojani2000 at hotmail.com
Tue Jul 1 12:40:28 CDT 2003
You are kidding, wright?!
This: <input type='text' value=str> will show you nothing but "str"
This string : str = "this is a 'test' and \"double quote\""; -is correct!
This is how you will show it in your input:
<INPUT TYPE='text' VALUE="" NAME="myString">
<SCRIPT...>
str = "this is a 'test' and \"double quote\"";
myString.value=str
</SCRIPT>
And this is how it will read:
this is a 'test' and "double quote"
Cheers!
>From: alwang at micron.com
>Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
>To: <javascript at LaTech.edu>
>Subject: RE: [Javascript] If a string contains many ' and ", how to
>dealwithit injavascript?
>Date: Tue, 1 Jul 2003 09:49:39 -0600
>
>I tried it, seems it can not work quite well in javascript.
>for example:
>
>str = "this is a 'test' and \"double quote\"";
><input type='text' value=str>
>will just show
>this is a 'test' and \
>
>Any good idea?
>Thanks,
>Alex.
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
More information about the Javascript
mailing list