简体   繁体   中英

Send a mail on closing the browser tab

I am currently working on a multistep form, and it has around 100 fields.

Suppose a user start filling the form and completed 30 fields and get harrased. And suddenly the user closes the tab, then a pop up should open as shown in the image below.

Now user enter the email address in a pop up form, and on clicking button, a mail will be send with all the filled values (ie 30 fields value).

在此处输入图片说明

Is this possible in some other way or this way...Thank you.

Use jQuery's window.unload : https://api.jquery.com/unload/

Make a call to the server through jQuery's $.post , and serialize the form data. You'll have to manage the data on the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM