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.
did any of the code above work for you? Please let us know in case you need more help. Thank you!
Ill add that since you asked about a LINK specifically, just use the above code, but instead of add it to your tag. so something like this:
This can be achieved without forms pretty easily:
alert("Hello! am a popup!");
link or img here
to use link instead of button, use a href tag instead of input tags.
To create a pop up window:
To create an alert box:
alert("Hello! I am an alert box!");