Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-05-2011, 11:55 PM #1
- Join Date
- Jul 2011
- Thanked 0 Times in 0 Posts
Code that automatically redirects a visitor after they click anywhere on the page?
I'm looking for code which does the following:
When a visitor visits my website and clicks anywhere on the page, (regardless of where the mouse clicks) it will automatically redirect him to another site.
I think an event listener might be a solution, but I'm not sure.
Thanks a lot for any help on this
If possible, I would like there to be a 2 second time delay before it does the redirection.
Last edited by tridentspk; 09-05-2011 at 11:58 PM.
09-06-2011, 12:12 PM #2
- Join Date
- Jun 2002
- London, England
- Thanked 2,621 Times in 2,599 Posts
"More than any other time in history, mankind faces a crossroads. One path leads to despair and utter hopelessness. The other, to total extinction. Let us pray we have the wisdom to choose correctly."
Woody Allen - US movie actor, comedian, & director (1935 - )
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.