अवलोकन
onpagehide इवेंट तब ट्रिगर होता है जब उपयोगकर्ता पेज छोड़कर दूसरे पेज पर जाता है (रिफ्रेश, लिंक क्लिक आदि)।
उदाहरण
<!DOCTYPE html> <html> <body onpagehide="newFunc()"> <p>Close the page and see what happens!</p> <script> function newFunc() { alert("Thank you!"); } </script> </body> </html>