how can I trigger an onleave event for mobile? | SoloLearn: Learn to code for FREE!

0

how can I trigger an onleave event for mobile?

I'm trying to set up an event that triggers when the users clicks the back button on their mobile.

6/1/2020 10:05:29 AM

Lucky Chu

2 Answers

New Answer

+1

You have to use 'backbutton' event with document. for example: document.addEvenetListener('backbutton', function() { //Code });

0

🔫 Rick Grimes thanks for this.