If the URL contains this do that in Javascript -


I want to display a certain message on a certain page.

Understand that you want to display something on page name I called "foo_page.html",

How can I do this using JavaScript?

You can do this:

  if (document. URL.indexOf ("foo_page.html") & gt; = 0} {... show your message}  

Comments