Google

Alert a message before leaving a web page using javascript

Google

Alert a message before leaving a web page using javascript

You may also like...

6 Responses

  1. Ankur says:

    Hi, Thnks for this amazing code.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  2. prateek says:

    thanx ….but i dont want the alert box when people click on the links within the site …what to do for that ?

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
  3. atrix says:

    how to make this only if a user i leaving site or closing browser, but not when he goes to a page within my site?

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    • admin says:

      You can create an alert box inside your website link using onclick attribute and javascript. Something like
      onClick=”javascript:alert(‘This is a test’)” , <a href=”” onClick=”javascript:alert(‘This is a test’)” >Test Link </a >
      I hope your issue has been resolved.

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
  4. i want to popup a star rating window when after moving to another game (other game links ) in my website http://www.mygamegallery.com how can i achieve this.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Close
Please support the site
By clicking any of these buttons you help our site to get better