Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

I need to insert some code so that when a person clicks on a link a popup box appears to say "you are leaving this website". Can anybody direct me to the line of code I need and the process.

Tina
2011-04-17 23:19:00
Terry,did any of the code above work for you? Please let us know in case you need more help. Thank you!
James Bruce
2011-04-15 07:14:00
Ill add that since you asked about a LINK specifically, just use the above code, but instead of add it to your
MAKEUSEOF VIDEO OF THE DAY
SCROLL TO CONTINUE WITH CONTENT
tag. so something like this:Link text
joey jimbob
2011-04-14 20:25:00
This can be achieved without forms pretty easily:function popup(){alert("Hello! am a popup!");} link or img here
OnlineTechtips.info
2011-04-14 10:00:00
to use link instead of button, use a href tag instead of input tags.
OnlineTechtips.info
2011-04-14 09:58:00
To create a pop up window:CLICK ME!To create an alert box:function show_alert(){alert("Hello! I am an alert box!");}