How do you do this ?? I need to display quote marks (") in an alert box.
Thanks in advance
Ian.
Printable View
How do you do this ?? I need to display quote marks (") in an alert box.
Thanks in advance
Ian.
Hi Ian
nice and easy one this just use singel quotes instead
alert('"hello"');
Hope this helps
Ian
Thanks for the reply, problem is i really need the quote marks displayed to be double " quote marks.
Ian.
You can use a backslash with a single quote or double quote to put them inside a literal in JavaScript. For example:
strExample = 'Programmers write \'Hello World\' programs often.';
or
alert("Programmers write \"Hello World\" often.");
Paul
yeah, that will work. use the sinqle quotes as your string delimiter and then you can put double quotes in side
alert(' jkjkj"jkjkj ');
Sorry, I didn't explain myself properly
or paul's way works as well, he posted without me realising
Thanks eveyone, figured it was something simple ...
Ian.