Langsung ke konten utama

Script Konfirmasi untuk Meninggalkan Blog

Script Konfirmasi untuk Meninggalkan Blog
Berikut akan saya bagikan kode script notifikasi pop up ketika pengunjung ingin meninggalkan posting atau laman blog.

Pada dasarnya kode javascript ini merupakan konfirmasi pengguna apakah ingin menutup browser atau tidak dengan mengklik close browser. Namun dapat dimodifikasi dengan menambahkan kata-kata kita sendiri. Sehingga dapat terlihat seperti pada gambar disamping.

Memasang Javascript konfirmasi meninggalkan blog

Langkah 1. Copy kode script berikut:
<script language="JavaScript"> window.onbeforeunload = confirmExit; function confirmExit() { return "You have attempted to leave this page. If you have made any changes to the fields without clicking the Save button, your changes will be lost. Are you sure you want to exit this page?";
}
</script>
Note:
Tulisan berwarna Merah dapat kamu ganti dengan kata-kata sendiri. Sepert, "Anda yakin ingin meninggalkan situs" atau dan lain sebagainya sesuai keinginan kamu.

Langkah 2. Pada Tata Letak >> Tambahkan Gadget >> HTML/JavaScript. Paste kode yang sudah di copy diatas pada gadget yang telah di tambahkan.

Langkah 3. Simpan. Untuk melihat script berhasil apa tidak, klik close browser dan lihat notifikasi muncul apa tidak.

Komentar

Postingan populer dari blog ini

Mod Immortal Treasure Trove Carafe 2018

Mod immortal Treasure Trove Carafe 2018. This treasure contain of : Huskar - The Spoils of Dezun, Ogre Magi - Gimlek Decanter, Pangolier - Mask of Confidant, Venomancer - Cult of Aktok, Rubick - Crux of Perplex, Disruptor - Orb of Deliverance, Silencer - Glaive of Oscilla, Storm Spirit - Mandate of the Stormborn, Windranger - Sylvan Vedette and Mirana mount - Axia of Metira. Hope you guys like this mods cosmetic skin and support our favorite game Dota 2 in steam community market. No money? Just mods! Enjoy the game and boost your Matchmaking Ratings MMR and Seasonal Rankings Medals !

Rubick - Rambling Fatebender

Mod Rubick - Rambling Fatebender rare item Dota 2 Reborn from Treasure of the Emerald Revival. This item consists of : Staff of the Rambling Fatebender Cape of the Rambling Fatebender Pauldrons of the Rambling Fatebender Mask of the Rambling Fatebender Rubick - Rambling Fatebender Hope you guys like this mod and support our favorite game in steam community market. No money? Just mods! Enjoy your game!

Broodmother - Epoch of the Abysm

Black Arachnia, the Broodmother - Epoch of the Abysm mods rare item Dota 2 Reborn from Fortivus 2017 Treasure. This item consists of : Eyes of the Abysm Abdomen of the Abysm Anterior of the Abysm Legs of the Abysm Creepling of the Abysm Broodmother - Epoch of the Abysm Hope you guys like this mods and support our favorite game in steam community market. No money? Just mods! Enjoy your game!