Escaping Problem
Posted
by James Jeffery
on Stack Overflow
See other posts from Stack Overflow
or by James Jeffery
Published on 2010-06-14T19:09:11Z
Indexed on
2010/06/14
19:12 UTC
Read the original article
Hit count: 340
JavaScript
How can escape quotes for use in HTML? My line of code is:
<body onload="setTimeout('window.location='http://somepage.com'', 1000)">
As you can see in the current example, there are two ', and a " being used. How can I escape them for the above to work?
The onload contents are set dynamically for a system I am working on @ work.
© Stack Overflow or respective owner