Insert Alert Message and Dialog Box with OK or Confirmation button


Alert Box with OK button

To create an alert message box, login to your account, go to Template -> Page Elements -> Add a Page Element in your left sidebar or post body area, and select HTML/JavaScript. Paste the code shown below:-


<script type="text/javascript">
alert('You are about to enter an extremely funny site. People who are prone to laughing fits ... Beware!')
</script>
<noscript>Enable javascript in your browser to view an important message.</noscript>
Alert Box with Confirmation button


<script type="text/javascript">
confirm('This site contains explicit contents. Are you sure you want to continue?');
if (confirm('This site contains explicit contents. Are you sure you want to continue?')) {
window.location = "http://djmix4u.blogspot.com/";
}
else {
window.location = "http://www.google.com/";
}
</script>
Previous Post Next Post