Prompt the visitor to optionally give feedback when leaving the site
I am newbie in webdesign field. I would like to add a prompt when a visitor of my website leaves the site or closes the browser.
The prompt should be to optionally give his/her feedback about the site.
--> User can fill a simple form with comment & email id --> In this case, the comments should go to our mail id
--> The user can also leave the site without giving the feedback, saying NO to the prompt.
How can I create this?
Thanks in advance...