javascript - Escaping Problem -


How to avoid quotation marks in HTML? My line of code is:

  & lt; Body onload = "setTimeout ('window.location =' http: //somepage.com '', 1000)" & gt;  

As you can see in the current example, two 'and one' is being used. How can I avoid them to work from above?

Load content is dynamically set to the system I'm working on I @ work

  & lt; Body Onload = "setTimeout (function () {window.location = 'http: //somepage.com';}, 1000)" & gt;  

This should do your trick. To see it, it can make your JavaScript cleaner.

Cheers.!


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -