May 14, 2024

It's all about technology

How to show pop up message when visiting your website

You might have noticed when you visit some websites, they show a pop up window with a message that informs you about something or shows a welcome message. That’s a simple java script code that you can add to your site to show your desired message.

You will need to copy/paste the following java script between <header> and </header> in your webpage theme/codes:

<!-- From --->
<script>window.onload=function() {alert("Welcome to, I hope you enjoy our website!")}
window.onunload=function() {alert("Thanks for visiting us, hope to see you soon!")}</script><div style="display:none">

This code will show the message: “Welcome to, I hope you enjoy our website”, you can change it to your desired message that want to show up on your website.

Translate »